Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
ultralight::String Class Reference

#include <Ultralight/String.h>

Details

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

Note
Internally, all strings are represented as String8 (UTF-8).

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.
 
String8utf8 ()
 Get native UTF-8 string.
 
const String8utf8 () const
 Get native UTF-8 string.
 
String16 utf16 () const
 Convert to UTF-16 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.
 

Constructor & Destructor Documentation

◆ String() [1/8]

ultralight::String::String ( )

Create empty string.

◆ String() [2/8]

ultralight::String::String ( const char *  str)

Create from null-terminated, ASCII C-string.

◆ String() [3/8]

ultralight::String::String ( const char *  str,
size_t  len 
)

Create from raw, UTF-8 string with certain length.

◆ String() [4/8]

ultralight::String::String ( const String8 str)

Create from existing String8 (UTF-8).

◆ String() [5/8]

ultralight::String::String ( const Char16 str,
size_t  len 
)

Create from raw UTF-16 string with certain length.

◆ String() [6/8]

ultralight::String::String ( const String16 str)

Create from existing String16 (UTF-16)

◆ String() [7/8]

ultralight::String::String ( const String32 str)

Create from existing String32 (UTF-32)

◆ String() [8/8]

ultralight::String::String ( const String other)

Copy constructor.

◆ ~String()

ultralight::String::~String ( )

Destructor.

Member Function Documentation

◆ empty()

bool ultralight::String::empty ( ) const
inline

Check if string is empty or not.

◆ operator+=()

String & ultralight::String::operator+= ( const String other)

Append string with another.

◆ operator=()

String & ultralight::String::operator= ( const String other)

Assign string from another, copy is made.

◆ utf16()

String16 ultralight::String::utf16 ( ) const

Convert to UTF-16 string.

◆ utf32()

String32 ultralight::String::utf32 ( ) const

Convert to UTF-32 string.

◆ utf8() [1/2]

String8 & ultralight::String::utf8 ( )
inline

Get native UTF-8 string.

◆ utf8() [2/2]

const String8 & ultralight::String::utf8 ( ) const
inline

Get native UTF-8 string.

Friends And Related Symbol Documentation

◆ operator+

String operator+ ( String  lhs,
const String rhs 
)
friend

Concatenation operator.


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