JavaScript-1.5 Reference

JS_CompareStrings Function

Summary

Compares two JS strings, and reports the results of the comparison.

Syntax

intN JS_CompareStrings(JSString *str1, JSString *str2);
NameTypeDescription
str1JSString *First string to compare.
str2JSString *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

Groups [ Function ]
Documents [ LXR ID Search ]
Entries [ JS_ConvertValue | JS_GetEmptyStringValue | JS_GetStringBytes | JS_GetStringLength | JS_InternString | JS_NewArrayObject | JS_NewDouble | JS_NewFunction | JS_NewObject | JS_NewString | JS_NewStringCopyN | JS_NewStringCopyZ | JS_ValueToString ]

This page was generated by APIDOC