contents   index   previous   next



String localeCompare()

syntax:

string.localeCompare(compareStr)

where:

compareStr - a string with which to compare an instance string.

 

return:

number - indicating the relationship of two strings.

 

< 0 if string is less than compareStr

= 0 if string is the same as compareStr

> 0 if string is greater than compareStr

description:

This method returns a number that represents the result of a locale-sensitive string comparison of this object with that object. The result is intended to order strings in the sort order specified by the system default locale, and will be negative, zero, or positive, depending on whether string comes before compareStr in the sort order, the strings are equal, or string comes after compareStr.

 

see:

Clib.strcmpi(), Clib.stricmp()

 

example:

 


String match()