TDME2 1.9.121
|
Mutable string class. More...
#include <tdme/utilities/MutableString.h>
Public Member Functions | |
MutableString () | |
Public default constructor. More... | |
MutableString (const string &s) | |
Public constructor. More... | |
MutableString (int i) | |
Public constructor. More... | |
MutableString (float f, int32_t decimals=3) | |
Public constructor. More... | |
int32_t | size () const |
char | charAt (int32_t idx) const |
Get char at index. More... | |
MutableString & | reset () |
Reset. More... | |
MutableString & | set (char c) |
Set character. More... | |
MutableString & | append (char c) |
Append character. More... | |
MutableString & | insert (int32_t idx, char c) |
Insert character c at idx. More... | |
MutableString & | set (const string &s) |
Set string. More... | |
MutableString & | append (const string &s) |
Append string. More... | |
MutableString & | insert (int32_t idx, const string &s) |
Insert string at idx. More... | |
MutableString & | set (const MutableString &s) |
Set mutable string. More... | |
MutableString & | append (const MutableString &s) |
Append mutable string. More... | |
MutableString & | insert (int32_t idx, const MutableString &s) |
Insert mutable string at idx. More... | |
MutableString & | set (int32_t i) |
Set integer. More... | |
MutableString & | append (int32_t i) |
Append integer. More... | |
MutableString & | insert (int32_t idx, int32_t i) |
Insert integer at idx. More... | |
MutableString & | set (float f, int32_t decimals=3) |
Set float. More... | |
MutableString & | append (float f, int32_t decimals=3) |
Append float with given decimals. More... | |
MutableString & | insert (int32_t idx, float f, int32_t decimals=3) |
Insert float at idx. More... | |
MutableString & | remove (int32_t idx, int32_t count) |
Remove characters at idx with given length. More... | |
int32_t | indexOf (const MutableString &s, int32_t idx) const |
Returns the character index where string s have been found or -1 if not found. More... | |
int32_t | indexOf (const MutableString &s) const |
Returns the character index where string s have been found or -1 if not found. More... | |
void | replace (const string &what, const string &by, int beginIndex=0) |
Replace string with another string. More... | |
bool | empty () const |
bool | equals (const string &s2) const |
Equals. More... | |
bool | equals (const MutableString &s2) const |
Equals. More... | |
const string & | getString () const |
MutableString | clone () |
Clone. More... | |
Private Attributes | |
string | data |
MutableString | ( | ) |
Public default constructor.
Definition at line 18 of file MutableString.cpp.
MutableString | ( | const string & | s | ) |
MutableString | ( | int | i | ) |
MutableString | ( | float | f, |
int32_t | decimals = 3 |
||
) |
MutableString & append | ( | char | c | ) |
Append character.
c | char |
Definition at line 54 of file MutableString.cpp.
MutableString & append | ( | const MutableString & | s | ) |
Append mutable string.
s | s |
Definition at line 92 of file MutableString.cpp.
MutableString & append | ( | const string & | s | ) |
Append string.
s | s |
Definition at line 73 of file MutableString.cpp.
MutableString & append | ( | float | f, |
int32_t | decimals = 3 |
||
) |
Append float with given decimals.
f | f |
decimals | decimals |
Definition at line 146 of file MutableString.cpp.
MutableString & append | ( | int32_t | i | ) |
Append integer.
i | i |
Definition at line 111 of file MutableString.cpp.
char charAt | ( | int32_t | idx | ) | const |
MutableString clone | ( | ) |
Clone.
Definition at line 201 of file MutableString.cpp.
bool empty | ( | ) | const |
Definition at line 187 of file MutableString.cpp.
bool equals | ( | const MutableString & | s2 | ) | const |
Equals.
s2 | string 2 |
Definition at line 196 of file MutableString.cpp.
bool equals | ( | const string & | s2 | ) | const |
Equals.
s2 | string 2 |
Definition at line 191 of file MutableString.cpp.
|
inline |
Definition at line 227 of file MutableString.h.
int32_t indexOf | ( | const MutableString & | s | ) | const |
Returns the character index where string s have been found or -1 if not found.
s | string |
Definition at line 177 of file MutableString.cpp.
int32_t indexOf | ( | const MutableString & | s, |
int32_t | idx | ||
) | const |
Returns the character index where string s have been found or -1 if not found.
s | string |
idx | index |
Definition at line 172 of file MutableString.cpp.
MutableString & insert | ( | int32_t | idx, |
char | c | ||
) |
Insert character c at idx.
idx | index |
c | char |
Definition at line 60 of file MutableString.cpp.
MutableString & insert | ( | int32_t | idx, |
const MutableString & | s | ||
) |
Insert mutable string at idx.
idx | index |
s | string |
Definition at line 98 of file MutableString.cpp.
MutableString & insert | ( | int32_t | idx, |
const string & | s | ||
) |
Insert string at idx.
idx | index |
s | string |
Definition at line 79 of file MutableString.cpp.
MutableString & insert | ( | int32_t | idx, |
float | f, | ||
int32_t | decimals = 3 |
||
) |
Insert float at idx.
idx | index |
f | float |
decimals | decimals |
Definition at line 152 of file MutableString.cpp.
MutableString & insert | ( | int32_t | idx, |
int32_t | i | ||
) |
Insert integer at idx.
idx | index |
i | i |
Definition at line 117 of file MutableString.cpp.
MutableString & remove | ( | int32_t | idx, |
int32_t | count | ||
) |
Remove characters at idx with given length.
idx | idx |
count | length |
Definition at line 166 of file MutableString.cpp.
void replace | ( | const string & | what, |
const string & | by, | ||
int | beginIndex = 0 |
||
) |
Replace string with another string.
what | what to replace |
by | to replace by |
beginIndex | index to begin with |
Definition at line 182 of file MutableString.cpp.
MutableString & reset | ( | ) |
Reset.
Definition at line 41 of file MutableString.cpp.
MutableString & set | ( | char | c | ) |
Set character.
c | char |
Definition at line 47 of file MutableString.cpp.
MutableString & set | ( | const MutableString & | s | ) |
Set mutable string.
s | s |
Definition at line 85 of file MutableString.cpp.
MutableString & set | ( | const string & | s | ) |
Set string.
s | s |
Definition at line 66 of file MutableString.cpp.
MutableString & set | ( | float | f, |
int32_t | decimals = 3 |
||
) |
Set float.
f | f |
decimals | decimals |
Definition at line 139 of file MutableString.cpp.
MutableString & set | ( | int32_t | i | ) |
Set integer.
i | i |
Definition at line 104 of file MutableString.cpp.
|
inline |
Definition at line 45 of file MutableString.h.
|
private |
Definition at line 237 of file MutableString.h.