php strnatcmp()函数的用法总结
|
Definition and Usage 定义和用法The strnatcmp() function compares two strings using a "natural" algorithm.strnatcmp()函数的作用是:用自然运算法则比较字符串(大小写敏感)。 In a natural algorithm,the number 2 is less than the number 10. In computer sorting,10 is less than 2,because the first number in "10" is less than 2. This function returns: •0 - if the two strings are equal Tips and Notes -------------------------------------------------------------------------------- Example 代码如下:";echo strnatcmp("10Hello world!","2Hello world!");?> |
