Default Constructor |
DOMString(void) |
Creates a null string. |
Copy Constructors |
DOMString(const
DOMString&)
DOMString(const char*) DOMString(const char*, unsigned) |
These constructors can be used to copy a string or to create a string from a C-style, null-terminated string of characters or an array of characters of the given length. The array of characters, whether they are null-terminated or not, are assumed to be encoded in UTF-8. |
Operators |
DOMString& operator=(const DOMString&) |
bool operator==(const
DOMString&) const
bool operator!=(const DOMString&) const |
Two strings are equal either if they are both null strings, or if their length is the same and corresponding UTF-16 characters match. |
DOMString& operator+=(const DOMString&)
DOMString operator+(const DOMString&) const |
Append a string. |
Char16& operator[](unsigned) |
Char16 at(unsigned) const |
Methods |
bool isNull(void) const |
Returns true if the string is null. |
bool isEmpty(void) const |
Returns true if the string has zero length. |
unsigned length(void) const |
DOMString clone(void) const |
void fromUTF8(const Char8*, unsigned)
void fromUTF16(const Char16*, unsigned) void fromUnicode(const Char32*, unsigned) |
char* c_str(void) const
Char8* toUTF8(unsigned&) const Char16* fromUTF16(unsigned&) const Char32* fromUnicode(unsigned&) const |