'localeCompare()' Syntax, Parameters and Note : localeCompare « Javascript Methods « JavaScript Reference

Home
JavaScript Reference
1.Event Handlers Reference
2.Javascript Collections
3.Javascript Methods
4.Javascript Objects
5.Javascript Properties
JavaScript Reference » Javascript Methods » localeCompare 




'localeCompare()' Syntax, Parameters and Note

Note:

Compares the String value to the system's locale settings. 
Returns 
0         match
-1        no match, and the parameter value comes before 
          the String object's value in the locale sort order
1         no match, and the parameter value comes after the 
          String object's value in the locale sort order
    
Syntax:
    
stringName.localeCompare(param1)

Parameters:
    param1   Required; the string to search for inside the object.

    

      
      














Related examples in the same category
1.'localeCompare()' Example
2.'localeCompare()' is applied to
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.