该函数首先解析选项的第二个词(第一个词是名字),将它变为大写形式,然后比较两个字符串,并返回- 1、1或0。
This function first parses the second word from the option (the first word being the first name), changes it to upper case, and then compares the two strings and returns a -1, 1, or 0.
比如,compare方法比较两个字符串;sort和asort方法以与相应的php数组函数相同的方式对数组或关联数组进行排序。
For example, the compare method compares two strings; the sort and asort methods sort arrays or associative arrays in a way similar to the corresponding PHP array functions.
stringcomparator类:使用特定于地区的规则比较两个字符串。
Class StringComparator: Compares two strings using locale-specific rules.
应用推荐