public class UnprotectedStringBuffer extends Object implements IString
UnprotectedString| Modifier and Type | Class and Description |
|---|---|
protected class |
UnprotectedStringBuffer.AbstractCS
Base class for CharacterStream implementations.
|
protected class |
UnprotectedStringBuffer.CS
CharacterStream implementation.
|
protected class |
UnprotectedStringBuffer.WCS
CharacterStream implementation.
|
| Constructor and Description |
|---|
UnprotectedStringBuffer()
Create a new empty string.
|
UnprotectedStringBuffer(CharSequence s)
Create a string with the given one.
|
UnprotectedStringBuffer(Collection<UnprotectedString> strings)
Create a string with the given ones.
|
UnprotectedStringBuffer(IString s)
Create a string with the given one.
|
UnprotectedStringBuffer(String s)
Create a string with the given one.
|
UnprotectedStringBuffer(UnprotectedString string)
Create a string with the given one.
|
| Modifier and Type | Method and Description |
|---|---|
UnprotectedStringBuffer |
addFirst(char c)
Add the given string at the beginning.
|
UnprotectedStringBuffer |
addFirst(CharSequence s)
Add the given string at the beginning.
|
UnprotectedStringBuffer |
addFirst(UnprotectedString s)
Add the given string at the beginning.
|
UnprotectedStringBuffer |
append(char c)
Append a character.
|
UnprotectedStringBuffer |
append(char[] chars,
int offset,
int len)
Append characters.
|
UnprotectedStringBuffer |
append(CharSequence s)
Append characters.
|
char[][] |
asCharacters()
Convert into an array of character arrays.
|
ICharacterStream.Readable.Buffered |
asCharacterStream()
Create a readable CharacterStream from this string.
|
CharBuffer[] |
asCharBuffers()
Convert into an array of character buffers.
|
ICharacterStream.Writable.Buffered |
asWritableCharacterStream()
Create a writable CharacterStream from this string.
|
char |
charAt(int index) |
Async<IOException> |
encode(Charset charset,
IO.Writable output,
byte priority)
Encode this string with the given charset and write the result on the given writable IO.
|
boolean |
endsWith(CharSequence end)
Return true if this string ends with the given one.
|
boolean |
equals(UnprotectedStringBuffer s)
Compare this UnprotectedStringBuffer with another.
|
int |
fill(char[] chars,
int start)
Fill the given character array with the content of this string.
|
int |
fillUsAsciiBytes(byte[] bytes,
int start)
Same as with char but with bytes, all characters are directly converted into bytes without CharsetEncoder.
|
int |
getNbUsableUnprotectedStrings()
Return the number of UnprotectedString hold by this instance that can be used.
|
UnprotectedString |
getUnprotectedString(int index)
Return a specific UnprotectedString hold by this instance.
|
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.
|
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).
|
int |
length() |
UnprotectedStringBuffer |
removeEndChars(int nb)
Remove the given number of characters at the end.
|
UnprotectedStringBuffer |
removeStartChars(int nb)
Remove the given number of characters at the beginning.
|
UnprotectedStringBuffer |
replace(char oldChar,
char newChar)
Replace all occurrences of oldChar into newChar.
|
UnprotectedStringBuffer |
replace(char oldChar,
CharSequence replaceValue)
Replace all occurrences of oldChar into replaceValue.
|
UnprotectedStringBuffer |
replace(CharSequence search,
CharSequence replace)
Replace all occurrences of search into replace.
|
UnprotectedStringBuffer |
replace(CharSequence search,
UnprotectedString replace)
Replace all occurrences of search into replace.
|
UnprotectedStringBuffer |
replace(char oldChar,
UnprotectedString replaceValue)
Replace all occurrences of oldChar into replaceValue.
|
void |
replace(int start,
int end,
char c)
Remove characters from start to end (inclusive), and replace them by the given single character.
|
void |
replace(int start,
int end,
char[] chars)
Remove characters from start to end (inclusive), and replace them by the given characters.
|
void |
replace(int start,
int end,
UnprotectedString s)
Remove characters from start to end (inclusive), and replace them by the given string.
|
UnprotectedStringBuffer |
replace(int start,
int end,
UnprotectedStringBuffer s)
Remove characters from start to end (inclusive), and replace them by the given string.
|
void |
searchAndReplace(CharSequence start,
CharSequence end,
UnaryOperator<UnprotectedStringBuffer> valueProvider)
Search for a starting string and a ending string, and replace them including the content with new content.
|
void |
setCharAt(int index,
char c)
Set a character.
|
LinkedList<UnprotectedStringBuffer> |
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.
|
StringBuilder |
subSequence(int start,
int end) |
UnprotectedStringBuffer |
substring(int start)
Return a sub-string starting at the given position until the end.
|
UnprotectedStringBuffer |
substring(int start,
int end)
Return a sub-string starting at the given start position (included) until the given end position (excluded).
|
UnprotectedStringBuffer |
toLowerCase()
Convert this string to lower case.
|
String |
toString() |
UnprotectedStringBuffer |
toUpperCase()
Convert this string to upper case.
|
UnprotectedStringBuffer |
trimBeginning()
Remove spaces characters at the beginning of this string.
|
UnprotectedStringBuffer |
trimEnd()
Remove spaces characters at the end of this string.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitappend, asString, encode, equals, fill, fillUsAsciiBytes, indexOf, indexOf, isStartOf, toUsAsciiBytes, trimchars, codePointspublic UnprotectedStringBuffer()
public UnprotectedStringBuffer(UnprotectedString string)
public UnprotectedStringBuffer(Collection<UnprotectedString> strings)
public UnprotectedStringBuffer(String s)
public UnprotectedStringBuffer(CharSequence s)
public UnprotectedStringBuffer(IString s)
public int getNbUsableUnprotectedStrings()
public UnprotectedString getUnprotectedString(int index)
public int length()
length in interface CharSequencepublic boolean isEmpty()
IStringpublic char charAt(int index)
charAt in interface CharSequencepublic void setCharAt(int index,
char c)
IStringpublic UnprotectedStringBuffer append(char c)
IStringpublic UnprotectedStringBuffer append(char[] chars, int offset, int len)
IStringpublic UnprotectedStringBuffer append(CharSequence s)
IStringpublic UnprotectedStringBuffer addFirst(CharSequence s)
public UnprotectedStringBuffer addFirst(UnprotectedString s)
public UnprotectedStringBuffer addFirst(char c)
public int indexOf(char c,
int start)
IStringpublic int indexOf(CharSequence s, int start)
IStringpublic StringBuilder subSequence(int start, int end)
subSequence in interface CharSequencepublic UnprotectedStringBuffer substring(int start)
IStringpublic UnprotectedStringBuffer substring(int start, int end)
IStringpublic boolean equals(UnprotectedStringBuffer s)
public int fill(char[] chars,
int start)
IStringpublic int fillUsAsciiBytes(byte[] bytes,
int start)
IStringfillUsAsciiBytes in interface IStringpublic UnprotectedStringBuffer trimBeginning()
IStringtrimBeginning in interface IStringpublic UnprotectedStringBuffer trimEnd()
IStringpublic UnprotectedStringBuffer removeStartChars(int nb)
IStringremoveStartChars in interface IStringpublic UnprotectedStringBuffer removeEndChars(int nb)
IStringremoveEndChars in interface IStringpublic LinkedList<UnprotectedStringBuffer> split(char sep)
IStringpublic UnprotectedStringBuffer replace(CharSequence search, UnprotectedString replace)
public UnprotectedStringBuffer replace(CharSequence search, CharSequence replace)
public UnprotectedStringBuffer replace(char oldChar, char newChar)
IStringpublic UnprotectedStringBuffer replace(char oldChar, CharSequence replaceValue)
public UnprotectedStringBuffer replace(char oldChar, UnprotectedString replaceValue)
public void replace(int start,
int end,
char c)
public void replace(int start,
int end,
char[] chars)
public void replace(int start,
int end,
UnprotectedString s)
public UnprotectedStringBuffer replace(int start, int end, UnprotectedStringBuffer s)
public void searchAndReplace(CharSequence start, CharSequence end, UnaryOperator<UnprotectedStringBuffer> valueProvider)
public UnprotectedStringBuffer toLowerCase()
IStringtoLowerCase in interface IStringpublic UnprotectedStringBuffer toUpperCase()
IStringtoUpperCase in interface IStringpublic boolean startsWith(CharSequence start)
IStringstartsWith in interface IStringpublic boolean endsWith(CharSequence end)
IStringpublic String toString()
toString in interface CharSequencetoString in class Objectpublic char[][] asCharacters()
IStringasCharacters in interface IStringpublic CharBuffer[] asCharBuffers()
IStringasCharBuffers in interface IStringpublic ICharacterStream.Readable.Buffered asCharacterStream()
public ICharacterStream.Writable.Buffered asWritableCharacterStream()
public Async<IOException> encode(Charset charset, IO.Writable output, byte priority)
Copyright © 2019. All rights reserved.