public class CharSequences extends Object
CharSequence
utility methods.Constructor and Description |
---|
CharSequences() |
Modifier and Type | Method and Description |
---|---|
static int |
compareToIgnoreCase(CharSequence me,
CharSequence another)
Compares two character sequences with API like
Comparable.compareTo(T) . |
static boolean |
equals(CharSequence a,
CharSequence b)
Compares two character sequences for equality.
|
static CharSequence |
forAsciiBytes(byte[] bytes)
Adapts
CharSequence to an array of ASCII (7-bits per character)
bytes. |
static CharSequence |
forAsciiBytes(byte[] bytes,
int start,
int end)
Adapts
CharSequence to an array of ASCII (7-bits per character)
bytes. |
public static CharSequence forAsciiBytes(byte[] bytes)
CharSequence
to an array of ASCII (7-bits per character)
bytes.bytes
- ASCII bytespublic static CharSequence forAsciiBytes(byte[] bytes, int start, int end)
CharSequence
to an array of ASCII (7-bits per character)
bytes.bytes
- ASCII bytesstart
- index, inclusiveend
- index, exclusiveIndexOutOfBoundsException
- if start or end are negative, if end
is greater than length(), or if start is greater than endpublic static boolean equals(CharSequence a, CharSequence b)
public static int compareToIgnoreCase(CharSequence me, CharSequence another)
Comparable.compareTo(T)
.me
- The CharSequence that receives the compareTo call.another
- The other CharSequence.Comparable.compareTo(T)
.