|
Ultralight C++ API 2.0.0
|
#include <Ultralight/String8.h>
A null-terminated UTF-8 string container.
Public Types | |
| typedef char | CharType |
| Native character type. | |
Public Member Functions | |
| String8 () | |
| Make an empty String8. | |
| String8 (const char *c_str) | |
| Make a String8 from raw, null-terminated UTF-8 string. | |
| String8 (const char *c_str, size_t len) | |
| Make a String8 from raw UTF-8 string with certain length. | |
| String8 (const String8 &other) | |
| Make a deep copy of String8. | |
| String8 (String8 &&other) | |
| Move constructor. | |
| ~String8 () | |
| Destructor. | |
| String8 & | operator= (const String8 &other) |
| Assign a String8 to this one, deep copy is made. | |
| String8 & | operator= (String8 &&other) |
| Move assignment operator. | |
| String8 & | operator+= (const String8 &other) |
| Append a String8 to this one. | |
| char * | data () |
| Get raw UTF-8 data. | |
| const char * | data () const |
| Get raw UTF-8 data (const). | |
| size_t | length () const |
| Get length in bytes (not including null terminator). | |
| size_t | size () const |
| Get size in bytes (synonym for length()). | |
| size_t | sizeBytes () const |
| Get size in bytes. | |
| bool | empty () const |
| Check if string is empty. | |
| char & | operator[] (size_t pos) |
| Get character at specific position. | |
| const char & | operator[] (size_t pos) const |
| Get character at specific position (const). | |
| String16 | utf16 () const |
| Get a UTF-16 copy of this string. | |
| String32 | utf32 () const |
| Get a UTF-32 copy of this string. | |
| size_t | Hash () const |
| Hash function. | |
| bool | operator< (const String8 &other) const |
| Comparison operator. | |
| bool | operator== (const String8 &other) const |
| Equality operator. | |
| bool | operator!= (const String8 &other) const |
| Inequality operator. | |
Friends | |
| String8 | operator+ (String8 lhs, const String8 &rhs) |
| Concatenation operator. | |
| typedef char CharType |
Native character type.
| String8 | ( | ) |
Make an empty String8.
| String8 | ( | const char * | c_str | ) |
Make a String8 from raw, null-terminated UTF-8 string.
| String8 | ( | const char * | c_str, |
| size_t | len ) |
Make a String8 from raw UTF-8 string with certain length.
| String8 | ( | const String8 & | other | ) |
Make a deep copy of String8.
| String8 | ( | String8 && | other | ) |
Move constructor.
| ~String8 | ( | ) |
Destructor.
|
inline |
Get raw UTF-8 data.
|
inline |
Get raw UTF-8 data (const).
|
inline |
Check if string is empty.
| size_t Hash | ( | ) | const |
Hash function.
|
inline |
Get length in bytes (not including null terminator).
| bool operator!= | ( | const String8 & | other | ) | const |
Inequality operator.
| bool operator< | ( | const String8 & | other | ) | const |
Comparison operator.
| bool operator== | ( | const String8 & | other | ) | const |
Equality operator.
|
inline |
Get character at specific position.
|
inline |
Get character at specific position (const).
|
inline |
Get size in bytes (synonym for length()).
|
inline |
Get size in bytes.
| String16 utf16 | ( | ) | const |
Get a UTF-16 copy of this string.
| String32 utf32 | ( | ) | const |
Get a UTF-32 copy of this string.