org.apache.lucene.util
public abstract class StringHelper extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static StringInterner |
interner
Expert:
The StringInterner implementation used by Lucene.
|
Modifier and Type | Method and Description |
---|---|
static int |
bytesDifference(byte[] bytes1,
int len1,
byte[] bytes2,
int len2)
Compares two byte[] arrays, element by element, and returns the
number of elements common to both arrays.
|
static java.lang.String |
intern(java.lang.String s)
Return the same string object for all equal strings
|
static int |
stringDifference(java.lang.String s1,
java.lang.String s2)
Compares two strings, character by character, and returns the
first position where the two strings differ from one another.
|
public static StringInterner interner
public static java.lang.String intern(java.lang.String s)
public static final int bytesDifference(byte[] bytes1, int len1, byte[] bytes2, int len2)
bytes1
- The first byte[] to comparebytes2
- The second byte[] to comparepublic static final int stringDifference(java.lang.String s1, java.lang.String s2)
s1
- The first string to compares2
- The second string to compareCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.