public abstract class StringHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
bytesDifference(BytesRef left,
BytesRef right)
Compares two
BytesRef, element by element, and returns the
number of elements common to both arrays. |
static boolean |
endsWith(BytesRef ref,
BytesRef suffix)
Returns
true iff the ref ends with the given suffix. |
static boolean |
equals(String s1,
String s2) |
static Comparator<String> |
getVersionComparator() |
static boolean |
startsWith(BytesRef ref,
BytesRef prefix)
Returns
true iff the ref starts with the given prefix. |
public static int bytesDifference(BytesRef left, BytesRef right)
BytesRef, element by element, and returns the
number of elements common to both arrays.public static Comparator<String> getVersionComparator()
public static boolean startsWith(BytesRef ref, BytesRef prefix)
true iff the ref starts with the given prefix.
Otherwise false.ref - the BytesRef to testprefix - the expected prefixtrue iff the ref starts with the given prefix.
Otherwise false.Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.