Entry: JS_CompareStrings (Function)
Summary: Compares two JS strings, and reports the results of the comparison.
Syntax:
intN JS_CompareStrings(JSString *str1, JSString *str2);
Argument Type Description
str1 JSString * First string to compare.
str2 JSString * Second string to compare.
Description:
JS_CompareStrings compares two JS strings, str1 and str2. If the strings are identical in content and size, JS_CompareStrings returns 0.
If str1 is greater than str2, either in terms of its internal alphabetic sort order, or because it is longer in length, JS_CompareStrings returns a positive value.
If str1 is less than str2, either in terms of its internal alphabetic sort order, or because it is shorter in length, JS_CompareStrings returns a negative value.
See also:
|
|
|