java.lang.Object | |
↳ | com.pnfsoftware.jeb.util.format.CharSequences |
Utility methods for character sequences.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CharSequences() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static int |
indexOf(CharSequence text, char c, int from)
Implementation of
indexOf for CharSequence. | ||||||||||
static int |
indexOf(CharSequence text, char c)
Implementation of
indexOf for CharSequence. | ||||||||||
static int |
indexOf2(CharSequence text, char c0, char c1)
Find the first one of two characters and return its position.
| ||||||||||
static int |
indexOfn(CharSequence text, char... cs)
Find the first one of n characters and return its position.
| ||||||||||
static boolean |
isBlank(CharSequence s)
Determine if a character sequence is null, empty, or contains WSP chars exclusively.
| ||||||||||
static boolean |
startsWith(CharSequence text, String prefix, boolean trim)
Tests if this character sequence starts with the specified prefix.
| ||||||||||
static boolean | startsWith(CharSequence text, String prefix) | ||||||||||
static byte[] |
toByteArray(char[] chars)
Convert a char[] to a byte[] using the system-default charset.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Implementation of indexOf
for CharSequence. Same behavior as
indexOf(int)
.
text | the character sequence |
---|---|
c | char |
from | first index to start from |
Implementation of indexOf
for CharSequence. Same behavior as
indexOf(int)
.
text | the character sequence |
---|---|
c | char |
Find the first one of two characters and return its position.
text | the character sequence |
---|---|
c0 | first char |
c1 | second char |
Find the first one of n characters and return its position.
text | string |
---|---|
cs | characters |
Determine if a character sequence is null, empty, or contains WSP chars exclusively.
s | the character sequence |
---|
Tests if this character sequence starts with the specified prefix.
text | the main character sequence |
---|---|
prefix | the prefix token |
trim | act as a trimmed string: ignore preceding spaces |
true
if the string is a prefix of the main character sequence
Convert a char[] to a byte[] using the system-default charset.
chars | char[] to be converted |
---|