public abstract class StringHelper extends Object
| 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 int |
stringDifference(String s1,
String s2)
Compares two strings, character by character, and returns the
first position where the two strings differ from one another.
|
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(String s1, String s2)
s1 - The first string to compares2 - The second string to compareCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.