Basic static string class that handle fundamental string's functionalities. More...
Basic static string class that handle fundamental string's functionalities.
Public Member Methods | |
operator PCChar8 () const | |
PCChar8 casting operator. More... | |
Int32 | GetLength () const |
Gets the length. More... | |
BaseStaticString & | operator= (const BaseStaticString &right) |
Assignment operator. More... | |
BaseStaticString & | operator= (PCChar8 right) |
Assignment operator. More... | |
BaseStaticString & | operator= (Char8 right) |
Assignment operator. More... | |
BaseStaticString & | operator+= (PCChar8 right) |
Concatenation operator. More... | |
BaseStaticString & | operator+= (Char8 right) |
Concatenation operator. More... | |
Char8 | GetAt (int charIndex) const |
Gets character at. More... | |
Char8 | operator[] (int charIndex) const |
Array indexer operator. More... | |
Char8 | operator[] (Int32 charIndex) const |
Array indexer operator. More... | |
void | Left (BaseStaticString &result, Int32 count) const |
Extract the left part. More... | |
void | Right (BaseStaticString &result, Int32 count) const |
Extract the right part. More... | |
void | Mid (BaseStaticString &result, Int32 first, Int32 count) const |
Extract a string from this. More... | |
String | Left (Int32 count) const |
Extract the left part. More... | |
String | Right (Int32 count) const |
Extract the right part. More... | |
String | Mid (Int32 first, Int32 count) const |
Extract a middle string. More... | |
void | MakeUpper () |
Makes upper. More... | |
void | MakeLower () |
Makes lower. More... | |
void | TrimLeft () |
Trim left. Removes blank characters on the left of the string. More... | |
void | TrimRight () |
Trim right. Removes blank characters on the right of the string. More... | |
void | Trim () |
Trim left and right. Removes blank characters on both side of the string. More... | |
bool | Contains (Char8 c) const |
Query if this object contains the given character. More... | |
bool | Contains (PCChar8 subString) const |
Query if this object contains the given subString. More... | |
void | Replace (Char8 oldValue, Char8 newValue) |
Replaces a charactrer by another. More... | |
Int32 | Find (Char8 c, Int32 start=0) const |
Searches for a character in the string. More... | |
Int32 | Find (PCChar8 subString, Int32 start=0) const |
Searches for a subString in the string. More... | |
Int32 | FindRightToLeft (Char8 c, Int32 start=-1) const |
Searches for a character from the left in the string. More... | |
Int32 | FindRightToLeft (PCChar8 subString, Int32 start=-1) const |
Searches for a subString from the left in the string . More... | |
Int32 | Compare (PCChar8 text) const |
Compare to the given string. More... | |
bool | IsEmpty () const |
Query if the string is empty. More... | |
bool | IsBool () const |
Query if this string contains a bool value. More... | |
bool | IsInt (Int32 base=DefaultBase) const |
Query if this string contains an integer value. More... | |
bool | IsFloat () const |
Query if this string contains a float value.. More... | |
void | CheckBool () const |
Check bool. Raise an exception whenever the string doesn't contains a bool value. More... | |
void | CheckInt (Int32 base=DefaultBase) const |
Check int. Raise an exception whenever the string doesn't contains an integer value. More... | |
void | CheckFloat () const |
Check float. Raise an exception whenever the string doesn't contains a float value. More... | |
bool | ValBool () const |
Convert the string in bool value. More... | |
Int32 | ValInt (Int32 base=DefaultBase) const |
Convert the string in integer value. More... | |
UInt32 | ValUInt (Int32 base=DefaultBase) const |
Convert the string in integer value. More... | |
Int64 | ValInt64 () const |
Convert the string in integer value. More... | |
UInt64 | ValUInt64 () const |
Convert the string in integer value. More... | |
Float64 | ValFloat () const |
Convert the string in float value. More... | |
Int32 | GetSize () const |
Gets the string size. More... | |
void CheckBool | ( | ) | const |
Check bool. Raise an exception whenever the string doesn't contains a bool value.
void CheckFloat | ( | ) | const |
Check float. Raise an exception whenever the string doesn't contains a float value.
void CheckInt | ( | Int32 | base = DefaultBase | ) | const |
Check int. Raise an exception whenever the string doesn't contains an integer value.
base | (optional) the base. |
Compare to the given string.
text | Given string. |
0
if the strings are equal. Returns a value less than zero if the first character that does not match has a greater value in the given string than is this. Returns a value greater than zero if it is the opposite. bool Contains | ( | Char8 | c | ) | const |
Query if this object contains the given character.
c | The character to test for containment. |
bool Contains | ( | PCChar8 | subString | ) | const |
Query if this object contains the given subString.
subString | The subString to test for containment. |
Searches for a character in the string.
c | The character to search. |
start | (optional) the search start position. |
Searches for a subString in the string.
subString | The subString to search. |
start | (optional) the search start position. |
Searches for a character from the left in the string.
c | The character to search. |
start | (optional) the search start position. |
Searches for a subString from the left in the string .
subString | The subString to search. |
start | (optional) the search start position. |
Char8 GetAt | ( | int | charIndex | ) | const |
Gets character at.
charIndex | Zero-based index of the character. |
Int32 GetLength | ( | ) | const |
Gets the length.
|
inline |
Gets the string size.
bool IsBool | ( | ) | const |
Query if this string contains a bool value.
bool IsEmpty | ( | ) | const |
Query if the string is empty.
bool IsFloat | ( | ) | const |
Query if this string contains a float value..
bool IsInt | ( | Int32 | base = DefaultBase | ) | const |
Query if this string contains an integer value.
base | (optional) the base. |
void Left | ( | BaseStaticString & | result, |
Int32 | count | ||
) | const |
Extract the left part.
result | [in,out] String result. |
count | Number of character. |
Extract the left part.
count | Number of character. |
String is limited size string.
void MakeLower | ( | ) |
Makes lower.
void MakeUpper | ( | ) |
Makes upper.
void Mid | ( | BaseStaticString & | result, |
Int32 | first, | ||
Int32 | count | ||
) | const |
Extract a string from this.
result | [in,out] String result. |
first | First character of the extraction. |
count | Number of character of the extraction. |
Extract a middle string.
first | First position of the extraction. |
count | Number of character of the extraction. |
|
inline |
PCChar8 casting operator.
BaseStaticString& operator+= | ( | PCChar8 | right | ) |
Concatenation operator.
right | The right. |
BaseStaticString& operator+= | ( | Char8 | right | ) |
Concatenation operator.
right | The right. |
BaseStaticString& operator= | ( | const BaseStaticString & | right | ) |
Assignment operator.
right | The right. |
BaseStaticString& operator= | ( | PCChar8 | right | ) |
Assignment operator.
right | The right. |
BaseStaticString& operator= | ( | Char8 | right | ) |
Assignment operator.
right | The right. |
Char8 operator[] | ( | int | charIndex | ) | const |
Array indexer operator.
charIndex | Zero-based index of the character. |
Array indexer operator.
charIndex | Zero-based index of the character. |
Replaces a charactrer by another.
oldValue | The old character. |
newValue | The new character. |
void Right | ( | BaseStaticString & | result, |
Int32 | count | ||
) | const |
Extract the right part.
result | [in,out] String result. |
count | Number of character. |
Extract the right part.
count | Number of character. |
String is limited size string.
void Trim | ( | ) |
Trim left and right. Removes blank characters on both side of the string.
void TrimLeft | ( | ) |
Trim left. Removes blank characters on the left of the string.
void TrimRight | ( | ) |
Trim right. Removes blank characters on the right of the string.
bool ValBool | ( | ) | const |
Convert the string in bool value.
Float64 ValFloat | ( | ) | const |
Convert the string in float value.
Convert the string in integer value.
base | (optional) the base. |
Int64 ValInt64 | ( | ) | const |
Convert the string in integer value.
Convert the string in integer value.
base | (optional) the base. |
UInt64 ValUInt64 | ( | ) | const |
Convert the string in integer value.