| java.lang.Object | |
| ↳ | com.pnfsoftware.jeb.util.format.CharSequences |
Utility methods for character sequences.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| CharSequences() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static StringBuilder |
f(StringBuilder stb, String format, Object... args)
Format using the standard
US. | ||||||||||
| static StringBuilder |
f(String format, Object... args)
Format using the standard
US. | ||||||||||
| 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)
Tests if this character sequence starts with the specified prefix.
| ||||||||||
| static byte[] |
toByteArray(char[] chars)
Convert a char[] to a byte[], using UTF-8 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 |
true if the string is a prefix of the main character sequence
Convert a char[] to a byte[], using UTF-8 Charset.
| chars | char[] to be converted |
|---|