public interface IString extends CharSequence
| Modifier and Type | Method and Description |
|---|---|
IString |
append(char c)
Append a character.
|
default IString |
append(char[] chars)
Append characters.
|
IString |
append(char[] chars,
int offset,
int len)
Append characters.
|
IString |
append(CharSequence s)
Append characters.
|
default char[][] |
asCharacters()
Convert into an array of character arrays.
|
CharBuffer[] |
asCharBuffers()
Convert into an array of character buffers.
|
default String |
asString()
Convert this string into a Java string.
|
default ByteBuffer |
encode(Charset cs)
Encode this string into a ByteBuffer using the specified charset.
|
boolean |
endsWith(CharSequence end)
Return true if this string ends with the given one.
|
default boolean |
equals(CharSequence s)
Compare the given CharSequence with this string.
|
default int |
fill(char[] chars)
Fill the given character array with the content of this string.
|
int |
fill(char[] chars,
int start)
Fill the given character array with the content of this string.
|
default int |
fillUsAsciiBytes(byte[] bytes)
Same as with char but with bytes, all characters are directly converted into bytes without CharsetEncoder.
|
int |
fillUsAsciiBytes(byte[] bytes,
int start)
Same as with char but with bytes, all characters are directly converted into bytes without CharsetEncoder.
|
default int |
indexOf(char c)
Return the index of the first occurrence of the given character, or -1 if not found.
|
int |
indexOf(char c,
int start)
Return the index of the first occurrence of the given character, starting at the given position, or -1 if not found.
|
default int |
indexOf(CharSequence s)
Return the index of the first occurrence of the given CharSequence, or -1 if not found.
|
int |
indexOf(CharSequence s,
int start)
Return the index of the first occurrence of the given CharSequence, starting at the given position, or -1 if not found.
|
boolean |
isEmpty()
Return true if empty (length == 0).
|
default boolean |
isStartOf(CharSequence s)
Return true if this string is a start for the given one.
|
IString |
removeEndChars(int nb)
Remove the given number of characters at the end.
|
IString |
removeStartChars(int nb)
Remove the given number of characters at the beginning.
|
IString |
replace(char oldChar,
char newChar)
Replace all occurrences of oldChar into newChar.
|
void |
setCharAt(int index,
char c)
Set a character.
|
List<? extends IString> |
split(char sep)
Return a list of strings, by splitting the current string using the given character as separator.
|
boolean |
startsWith(CharSequence start)
Return true if this string starts with the given one.
|
IString |
substring(int start)
Return a sub-string starting at the given position until the end.
|
IString |
substring(int start,
int end)
Return a sub-string starting at the given start position (included) until the given end position (excluded).
|
IString |
toLowerCase()
Convert this string to lower case.
|
IString |
toUpperCase()
Convert this string to upper case.
|
default byte[] |
toUsAsciiBytes()
Same as with char but with bytes, all characters are directly converted into bytes without CharsetEncoder.
|
default IString |
trim()
Remove spaces characters at the beginning and the end of this string, and return this instance.
|
IString |
trimBeginning()
Remove spaces characters at the beginning of this string.
|
IString |
trimEnd()
Remove spaces characters at the end of this string.
|
charAt, chars, codePoints, length, subSequence, toStringboolean isEmpty()
void setCharAt(int index,
char c)
IString append(char c)
IString append(char[] chars, int offset, int len)
default IString append(char[] chars)
IString append(CharSequence s)
int indexOf(char c,
int start)
int indexOf(CharSequence s, int start)
default int indexOf(char c)
default int indexOf(CharSequence s)
IString substring(int start)
IString substring(int start, int end)
int fill(char[] chars,
int start)
default int fill(char[] chars)
int fillUsAsciiBytes(byte[] bytes,
int start)
default int fillUsAsciiBytes(byte[] bytes)
default byte[] toUsAsciiBytes()
IString trimBeginning()
IString trimEnd()
default IString trim()
IString replace(char oldChar, char newChar)
IString removeEndChars(int nb)
IString removeStartChars(int nb)
IString toLowerCase()
IString toUpperCase()
List<? extends IString> split(char sep)
default boolean equals(CharSequence s)
boolean startsWith(CharSequence start)
boolean endsWith(CharSequence end)
default boolean isStartOf(CharSequence s)
default String asString()
default char[][] asCharacters()
CharBuffer[] asCharBuffers()
default ByteBuffer encode(Charset cs) throws CharacterCodingException
CharacterCodingExceptionCopyright © 2019. All rights reserved.