|
Ultralight C API 1.4.0
|
Unicode string container (natively UTF-8).
#include <Ultralight/CAPI/CAPI_String.h>
This class is used to represent strings in Ultralight. It can be created from a variety of string types (ASCII, UTF-8, UTF-16) and accessed as a null-terminated UTF-8 buffer.
Functions | |
| ULString | ulCreateString (const char *str) |
| Create string from null-terminated ASCII C-string. | |
| ULString | ulCreateStringUTF8 (const char *str, size_t len) |
| Create string from UTF-8 buffer. | |
| ULString | ulCreateStringUTF16 (ULChar16 *str, size_t len) |
| Create string from UTF-16 buffer. | |
| ULString | ulCreateStringFromCopy (ULString str) |
| Create string from copy of existing string. | |
| void | ulDestroyString (ULString str) |
| Destroy string (you should destroy any strings you explicitly Create). | |
| char * | ulStringGetData (ULString str) |
| Get native UTF-8 buffer data (always null-terminated). | |
| size_t | ulStringGetLength (ULString str) |
| Get length (in bytes) of the UTF-8 buffer data, not including null terminator. | |
| bool | ulStringIsEmpty (ULString str) |
| Whether this string is empty or not. | |
| void | ulStringAssignString (ULString str, ULString new_str) |
| Replaces the contents of 'str' with the contents of 'new_str'. | |
| void | ulStringAssignCString (ULString str, const char *c_str) |
| Replaces the contents of 'str' with the contents of a C-string. | |
| ULString ulCreateString | ( | const char * | str | ) |
Create string from null-terminated ASCII C-string.
| ULString ulCreateStringUTF8 | ( | const char * | str, |
| size_t | len ) |
Create string from UTF-8 buffer.
| void ulDestroyString | ( | ULString | str | ) |
Destroy string (you should destroy any strings you explicitly Create).
| void ulStringAssignCString | ( | ULString | str, |
| const char * | c_str ) |
Replaces the contents of 'str' with the contents of a C-string.
Replaces the contents of 'str' with the contents of 'new_str'.
| char * ulStringGetData | ( | ULString | str | ) |
Get native UTF-8 buffer data (always null-terminated).
| size_t ulStringGetLength | ( | ULString | str | ) |
Get length (in bytes) of the UTF-8 buffer data, not including null terminator.
| bool ulStringIsEmpty | ( | ULString | str | ) |
Whether this string is empty or not.