public final class TokenUtilities extends Object
Modifier and Type | Method and Description |
---|---|
static String |
debugText(CharSequence text)
Return the given text as String
translating the special characters (and '\') into escape sequences.
|
static boolean |
endsWith(CharSequence text,
CharSequence suffix)
Implementation of
String.endsWith(String) for character sequences. |
static boolean |
equals(CharSequence text,
Object o)
Compare character sequence to another object.
|
static int |
indexOf(CharSequence text,
CharSequence seq)
Implementation of
String.indexOf(String) for character sequences. |
static int |
indexOf(CharSequence text,
CharSequence seq,
int fromIndex)
Implementation of
String.indexOf(String,int) for character sequences. |
static int |
indexOf(CharSequence text,
int ch)
Implementation of
String.indexOf(int) for character sequences. |
static int |
indexOf(CharSequence text,
int ch,
int fromIndex)
Implementation of
String.indexOf(int,int) for character sequences. |
static int |
lastIndexOf(CharSequence text,
CharSequence seq)
Implementation of
String.lastIndexOf(String) for character sequences. |
static int |
lastIndexOf(CharSequence text,
CharSequence seq,
int fromIndex)
Implementation of
String.lastIndexOf(String,int) for character sequences. |
static int |
lastIndexOf(CharSequence text,
int ch)
Implementation of
String.lastIndexOf(int) for character sequences. |
static int |
lastIndexOf(CharSequence text,
int ch,
int fromIndex)
Implementation of
String.lastIndexOf(int,int) for character sequences. |
static boolean |
startsWith(CharSequence text,
CharSequence prefix)
Implementation of
String.startsWith(String) for character sequences. |
static boolean |
textEquals(CharSequence text1,
CharSequence text2)
Test whether the given character sequences represent
the same text content.
|
static CharSequence |
trim(CharSequence text)
Implementation of
String.trim() for character sequences. |
public static boolean textEquals(CharSequence text1, CharSequence text2)
text1
- non-null text to be compared to the other text parameter.text2
- non-null text to be compared to the previous text parameter.true
if the given character sequences represent
the same text content.public static boolean equals(CharSequence text, Object o)
text
- character sequence being compared to the given object.
It may be null
.o
- object to be compared to the character sequence.
It may be null
.public static int indexOf(CharSequence text, int ch)
String.indexOf(int)
for character sequences.public static int indexOf(CharSequence text, int ch, int fromIndex)
String.indexOf(int,int)
for character sequences.public static int indexOf(CharSequence text, CharSequence seq)
String.indexOf(String)
for character sequences.public static int indexOf(CharSequence text, CharSequence seq, int fromIndex)
String.indexOf(String,int)
for character sequences.public static int lastIndexOf(CharSequence text, CharSequence seq)
String.lastIndexOf(String)
for character sequences.public static int lastIndexOf(CharSequence text, CharSequence seq, int fromIndex)
String.lastIndexOf(String,int)
for character sequences.public static int lastIndexOf(CharSequence text, int ch)
String.lastIndexOf(int)
for character sequences.public static int lastIndexOf(CharSequence text, int ch, int fromIndex)
String.lastIndexOf(int,int)
for character sequences.public static boolean startsWith(CharSequence text, CharSequence prefix)
String.startsWith(String)
for character sequences.public static boolean endsWith(CharSequence text, CharSequence suffix)
String.endsWith(String)
for character sequences.public static CharSequence trim(CharSequence text)
String.trim()
for character sequences.public static String debugText(CharSequence text)
text
- non-null text to be debugged.