|
| String () |
| String (const String &other) |
| String (const StringRef &strRef) |
| String (const std::string &stdStr) |
| String (const char *cStr) |
| String (const char *text, size_t textSize) |
| ~String () |
bool | empty () const |
size_t | size () const |
size_t | capacity () const |
const char * | data () const |
const char * | c_str () const |
iterator | begin () |
ConstIterator | begin () const |
iterator | end () |
ConstIterator | end () const |
char & | operator[] (size_t index) |
const char & | operator[] (size_t index) const |
char & | at (size_t index) |
const char & | at (size_t index) const |
void | reserve (size_t capacity) |
void | resize (size_t size) |
void | resize (size_t size, char filler) |
String & | insert (size_t offset, const char *text, size_t textSize) |
String & | append (const char *text, size_t textSize) |
String & | assign (const char *text, size_t textSize) |
String & | replace (size_t offset, size_t count, const char *text, size_t textSize) |
void | erase (size_t offset, size_t count) |
void | clear () |
| operator std::string () const |
bool | operator== (const String &other) const |
bool | operator!= (const String &other) const |
String & | operator= (const String &other) |
String & | operator= (const std::string &other) |
String & | operator= (const char *other) |
String & | operator= (char other) |
String & | operator+= (const String &text) |
String & | operator+= (const char *text) |
String & | operator+= (const std::string &text) |
String & | operator+= (char character) |
Definition at line 36 of file String.h.
◆ ConstIterator
Read-only access over characters.
Definition at line 43 of file String.h.
◆ iterator
Read-write access over characters.
Definition at line 40 of file String.h.
◆ String() [1/6]
Initializes empty string.
◆ String() [2/6]
Initializes as copy of another instance.
◆ String() [3/6]
Initializes as copy of what is referred by StringRef instance.
◆ String() [4/6]
String |
( |
const std::string & | stdStr | ) |
|
|
explicit |
Initializes as copy of std::string instance.
◆ String() [5/6]
Initializes as copy of null-terminated C string.
◆ String() [6/6]
String |
( |
const char * | text, |
|
|
size_t | textSize ) |
Initializes from sequence of give size.
◆ ~String()
Cleans up internal resources.
◆ append()
String & append |
( |
const char * | text, |
|
|
size_t | textSize ) |
Appends subsequence to the end.
◆ assign()
String & assign |
( |
const char * | text, |
|
|
size_t | textSize ) |
Re-initializes instance with given string.
◆ at() [1/2]
char & at |
( |
size_t | index | ) |
|
|
inline |
Provides safe access to the character via its reference located at specified index.
Definition at line 252 of file String.h.
◆ at() [2/2]
const char & at |
( |
size_t | index | ) |
const |
|
inline |
Provides safe access to the character via its reference located at specified index.
Definition at line 262 of file String.h.
◆ begin() [1/2]
Points to the first element in the sequence.
Definition at line 222 of file String.h.
◆ begin() [2/2]
Points to the first element in the sequence.
Definition at line 227 of file String.h.
◆ c_str()
const char * c_str |
( |
| ) |
const |
|
inline |
Returns string as C string.
Definition at line 217 of file String.h.
◆ capacity()
size_t capacity |
( |
| ) |
const |
|
inline |
Number of characters that can be put into sequence without reallocating internal store.
Definition at line 207 of file String.h.
◆ clear()
Erases all characters in the string.
◆ data()
const char * data |
( |
| ) |
const |
|
inline |
Direct read-only access to buffer which holds the sequence.
Definition at line 212 of file String.h.
◆ empty()
Indicates whether sequence is empty.
Definition at line 197 of file String.h.
◆ end() [1/2]
Points to the location succeeding the last element in the sequence.
Definition at line 232 of file String.h.
◆ end() [2/2]
Points to the location succeeding the last element in the sequence.
Definition at line 237 of file String.h.
◆ erase()
void erase |
( |
size_t | offset, |
|
|
size_t | count ) |
Erases subsequence of specified length at specified position.
◆ insert()
String & insert |
( |
size_t | offset, |
|
|
const char * | text, |
|
|
size_t | textSize ) |
Inserts subsequence at specified position.
◆ operator std::string()
operator std::string |
( |
| ) |
const |
|
inline |
Implicit conversion to std::string type.
Definition at line 272 of file String.h.
◆ operator!=()
bool operator!= |
( |
const String & | other | ) |
const |
Compares with other instance for inequality.
◆ operator+=() [1/4]
String & operator+= |
( |
char | character | ) |
|
|
inline |
Appends other string to the end.
Definition at line 317 of file String.h.
◆ operator+=() [2/4]
String & operator+= |
( |
const char * | text | ) |
|
|
inline |
Appends other string to the end.
Definition at line 302 of file String.h.
◆ operator+=() [3/4]
String & operator+= |
( |
const std::string & | text | ) |
|
|
inline |
Appends other string to the end.
Definition at line 312 of file String.h.
◆ operator+=() [4/4]
Appends other string to the end.
Definition at line 297 of file String.h.
◆ operator=() [1/4]
String & operator= |
( |
char | other | ) |
|
|
inline |
Reinitializes instance as copy of another one.
Definition at line 292 of file String.h.
◆ operator=() [2/4]
String & operator= |
( |
const char * | other | ) |
|
|
inline |
Reinitializes instance as copy of another one.
Definition at line 282 of file String.h.
◆ operator=() [3/4]
String & operator= |
( |
const std::string & | other | ) |
|
|
inline |
Reinitializes instance as copy of another one.
Definition at line 277 of file String.h.
◆ operator=() [4/4]
Reinitializes instance as copy of another one.
◆ operator==()
bool operator== |
( |
const String & | other | ) |
const |
Compares with other instance for equality.
◆ operator[]() [1/2]
char & operator[] |
( |
size_t | index | ) |
|
|
inline |
Reference to the character located at specified index.
- Note
- For a performance considerations does NOT check bounds of the character being accessed.
Definition at line 242 of file String.h.
◆ operator[]() [2/2]
const char & operator[] |
( |
size_t | index | ) |
const |
|
inline |
Const reference to the character located at specified index.
- Note
- For a performance considerations does NOT check bounds of the character being accessed.
Definition at line 247 of file String.h.
◆ replace()
String & replace |
( |
size_t | offset, |
|
|
size_t | count, |
|
|
const char * | text, |
|
|
size_t | textSize ) |
Replaces subsequence of specified length at specified position with the new subsequence.
◆ reserve()
void reserve |
( |
size_t | capacity | ) |
|
Makes internal store to be capable of storing at least specified number of characters without necessity to reallocate it.
◆ resize() [1/2]
void resize |
( |
size_t | size | ) |
|
Specifies new size for the sequence, appending or erasing elements as required.
◆ resize() [2/2]
void resize |
( |
size_t | size, |
|
|
char | filler ) |
Specifies new size for the sequence, appending or erasing elements as required.
◆ size()