MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / compareTo

Method compareTo

Ports/CLDC11/src/java/lang/String.java:130–132  ·  view source on GitHub ↗
(java.lang.String anotherString)

Source from the content-addressed store, hash-verified

128 /// This is the definition of lexicographic ordering. If two strings are different, then either they have different characters at some index that is a valid index for both strings, or their lengths are different, or both. If they have different characters at one or more index positions, let k be the smallest such index; then the string whose character at position k has the smaller value, as determined by using the < operator, lexicographically precedes the other string. In this case, compareTo returns the difference of the two character values at position k in the two string -- that is, the value:
129 /// this.charAt(k)-anotherString.charAt(k) If there is no index position at which they differ, then the shorter string lexicographically precedes the longer string. In this case, compareTo returns the difference of the lengths of the strings -- that is, the value: this.length()-anotherString.length()
130 public int compareTo(java.lang.String anotherString){
131 return 0; //TODO codavaj!!
132 }
133
134 public int compareToIgnoreCase(java.lang.String anotherString){
135 return 0; //TODO codavaj!!

Callers 2

stableStringSortMethod · 0.95
stableStringSortMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected