Ultralight  1.0.0
A fast, lightweight, HTML UI engine for native apps.
ultralight::String Class Reference

UTF-16 String container with conversions for UTF-8 and UTF-32. More...

#include <String.h>

Public Member Functions

 String ()
 Create empty string.
 
 String (const char *str)
 Create from null-terminated, ASCII C-string.
 
 String (const char *str, size_t len)
 Create from raw, UTF-8 string with certain length.
 
 String (const String8 &str)
 Create from existing String8 (UTF-8).
 
 String (const Char16 *str, size_t len)
 Create from raw UTF-16 string with certain length.
 
 String (const String16 &str)
 Create from existing String16 (UTF-16)
 
 String (const String32 &str)
 Create from existing String32 (UTF-32)
 
 String (const String &other)
 Copy constructor.
 
 ~String ()
 Destructor.
 
Stringoperator= (const String &other)
 Assign string from another, copy is made.
 
Stringoperator+= (const String &other)
 Append string with another.
 
String16utf16 ()
 Get native UTF-16 string.
 
const String16utf16 () const
 Get native UTF-16 string.
 
String8 utf8 () const
 Convert to UTF-8 string.
 
String32 utf32 () const
 Convert to UTF-32 string.
 
bool empty () const
 Check if string is empty or not.
 

Friends

String operator+ (String lhs, const String &rhs)
 Concatenation operator.
 

Detailed Description

UTF-16 String container with conversions for UTF-8 and UTF-32.

Note
Internally, all strings are represented as UTF-16.

Definition at line 27 of file String.h.


The documentation for this class was generated from the following file: