|
Simple Application Framework
1
|
#include <String.h>
Public Member Functions | |
| String () | |
| Constructor. | |
| String (Size count, const Char &c) | |
| Constructor. | |
| String (const char *str) | |
| Constructor. | |
| String (const String &str) | |
| Copy constructor. | |
| ~String () | |
| Destructor. | |
| Size | CodePoints () const |
| Get number of code points in the string. | |
| Size | Elements () const |
| Get number of code points in the string. | |
| bool | IsEmpty () const |
| Returns true if the string is empty. | |
| String | Left (Size sz) const |
| Get left part of the string. | |
| String | Lower () const |
| Get lowercase version of the string. | |
| String | Mid (Size pos, Size sz) const |
| Get substring. | |
| String | operator+ (const String &str) const |
| Concatenation operator. | |
| bool | operator< (const String &str) const |
| Comparison operator. | |
| String & | operator= (const String &str) |
| Assignment operator. | |
| bool | operator== (const String &str) const |
| Comparison operator. | |
| Char | operator[] (Size n) const |
| Return character at given position. | |
| String | Pad (const Char &ch, Size left, Size right) const |
| Pad the string with given character. | |
| String | Reverse () const |
| Returns a reversed string. | |
| String | Right (Size sz) const |
| Get right part of the string. | |
| void | Swap (String &s) |
| Swap the content of two strings. | |
| String | Trim (bool left, bool right) const |
| Trim the string. | |
| String | Upper () const |
| Get uppercase version of the string. | |
Protected Member Functions | |
| void | Free () |
| Free memory occupied by the string. | |
| void | Resize (Size sz) |
| Resize string. | |
Non-modifiable.
Nepouzit na ulozeni UTF-16 - Win (StringCompareEx), Mac?, Linux? Nemuselo by se transformovat. [] by vracelo Char a ne Char&
Imutable.
Uses UTF-32 (UCS-4) encoding.
| Saf::Text::String::String | ( | ) | [inline] |
Constructor.
| Saf::Text::String::String | ( | Size | count, |
| const Char & | c | ||
| ) |
Constructor.
| Saf::Text::String::String | ( | const char * | str | ) |
Constructor.
| Saf::Text::String::String | ( | const String & | str | ) | [inline] |
Copy constructor.
| Saf::Text::String::~String | ( | ) | [inline] |
Destructor.
| Size Saf::Text::String::CodePoints | ( | ) | const [inline] |
Get number of code points in the string.
| Size Saf::Text::String::Elements | ( | ) | const [inline] |
Get number of code points in the string.
| void Saf::Text::String::Free | ( | ) | [protected] |
Free memory occupied by the string.
| bool Saf::Text::String::IsEmpty | ( | ) | const [inline] |
Returns true if the string is empty.
| String Saf::Text::String::Left | ( | Size | sz | ) | const [inline] |
| String Saf::Text::String::Lower | ( | ) | const |
Get lowercase version of the string.
| String Saf::Text::String::Mid | ( | Size | pos, |
| Size | sz | ||
| ) | const |
Get substring.
| bool Saf::Text::String::operator< | ( | const String & | str | ) | const |
Comparison operator.
| bool Saf::Text::String::operator== | ( | const String & | str | ) | const |
Comparison operator.
| String Saf::Text::String::Pad | ( | const Char & | ch, |
| Size | left, | ||
| Size | right | ||
| ) | const |
Pad the string with given character.
| void Saf::Text::String::Resize | ( | Size | sz | ) | [protected] |
Resize string.
| String Saf::Text::String::Reverse | ( | ) | const |
Returns a reversed string.
| String Saf::Text::String::Right | ( | Size | sz | ) | const [inline] |
| void Saf::Text::String::Swap | ( | String & | s | ) | [inline] |
Swap the content of two strings.
Properties:
. | String Saf::Text::String::Trim | ( | bool | left, |
| bool | right | ||
| ) | const |
Trim the string.
| String Saf::Text::String::Upper | ( | ) | const |
Get uppercase version of the string.
1.8.0