String.localeCompare()

Actionscript:
  1. var letterA:String = "a";
  2. var letterZ:String = "z";
  3.  
  4. trace(letterA.localeCompare(letterZ));
  5. trace(letterZ.localeCompare(letterA));
  6. /*
  7. outputs
  8. -25
  9. 25
  10. */

String.localeCompare() calculates the sorting order between two Strings....

This entry was posted in strings and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*