public class Util extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
compare(char[] str1,
char[] str2)
Compares two strings lexicographically.
|
static int |
prefixLength(char[] s1,
char[] s2)
Returns the length of the common prefix between s1 and s2.
|
static int |
prefixLength(String s1,
String s2)
Returns the length of the common prefix between s1 and s2.
|
public static int compare(char[] str1,
char[] str2)
0 if the str1 is equal to str2;
a value less than 0 if str1
is lexicographically less than str2;
and a value greater than 0 if str1 is
lexicographically greater than str2.public static int prefixLength(char[] s1,
char[] s2)
Copyright © 2019. All rights reserved.