Package org.teiid.internal.core.index
Class Util
- java.lang.Object
-
- org.teiid.internal.core.index.Util
-
public class Util extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
compare(char[] str1, char[] str2)
Compares two strings lexicographically.static int
prefixLength(String s1, String s2)
Returns the length of the common prefix between s1 and s2.
-
-
-
Method Detail
-
compare
public static int compare(char[] str1, char[] str2)
Compares two strings lexicographically. The comparison is based on the Unicode value of each character in the strings.- Returns:
- the value
0
if the str1 is equal to str2; a value less than0
if str1 is lexicographically less than str2; and a value greater than0
if str1 is lexicographically greater than str2.
-
-