Lasso Soft Inc. > Home

[ string->onCompare ]

Method

[string->onCompare] indicates whether the string object is less than, equal to, or greater than the string parameter by returning either an integer less than zero, the integer zero, or an integer greater than zero, respectively.

  • Syntax
'String Object'->onCompare('String Pattern')
Examples
  • Beginner

To compare two strings:

Use the [string->onCompare] method. The following example compares two strings and returns a positive integer 10, since the string object "Rhino" is greater than the parameter "Rhine".

Code

'Rhino'->oncompare('Rhine')

Result

10

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft