compareto
常考释义
As you can see, we're simply taking $a and calling the CompareTo method, passing the second string ($b) as the sole method parameter.
如你所见,我们简单的使用$a及调用CompareTo方法,并传递第二个字符串($b),作为方法参数。
Use the CompareTo method to determine the ordering of instances of a class.
使用CompareTo方法可确定类的实例的排序。
The String. CompareTo method compares the string that the current string object encapsulates to another string or object.
String.CompareTo方法将当前字符串对象封装的字符串与另一个字符串或对象进行比较。
The Temperature object implements CompareTo by simply wrapping a call to the CompareTo method.
Temperature对象只需对CompareTo方法的调用进行简单包装即可实现CompareTo。
If CompareTo returns a 0, that means the two strings are equal; anything other than a 0 means that the two strings are different.
如果CompareTo返回0,那意味着两个字符串相等。
The following example uses the String. CompareTo method to perform a comparison of string1 and string2.
下面的示例使用String.CompareTo方法对string1与string2进行比较。
以上图片仅供学习交流使用,版权归原作者所有,如有侵权,请与我方联系