#include <unicode.h>
Public Member Functions | |
char * | c_str (void) |
Get c string we point to. | |
void | dec (void) |
Iterative decrement of a utf8 pointer to prior codepoint. | |
void | inc (void) |
Iterative increment of a utf8 pointer to next codepoint. | |
size_t | len (void) |
Get length of null terminated utf8 string in codepoints. | |
ucs4_t | operator * () |
Get unicode character pointed to by pointer. | |
operator bool () | |
Check if text is valid pointer. | |
operator char * () | |
Convert utf8 pointer to a generic string pointer. | |
bool | operator! () |
Check if text is an invalid pointer. | |
bool | operator!= (char *string) |
check if pointer does not equal another string. | |
utf8_pointer | operator+ (long offset) |
Get new utf8 string after adding a codepoint offset. | |
utf8_pointer & | operator++ () |
Iterative increment of a utf8 pointer to prior codepoint. | |
utf8_pointer & | operator+= (long offset) |
Adjust utf8 pointer by specified codepoints forward. | |
utf8_pointer | operator- (long offset) |
Get new utf8 string after subtracting a codepoint offset. | |
utf8_pointer & | operator-- () |
Iterative decrement of a utf8 pointer to next codepoint. | |
utf8_pointer & | operator-= (long offset) |
Adjust utf8 pointer by specified codepoints backward. | |
utf8_pointer & | operator= (char *string) |
Assign a utf8 string to point to. | |
bool | operator== (char *string) |
check if pointer equals another string. | |
ucs4_t | operator[] (long codepoint) |
Extract a unicode character from a specified codepoint. | |
utf8_pointer (utf8_pointer ©) | |
Create a utf8 pointer as a copy of existing utf8 pointer. | |
utf8_pointer (char *string) | |
Create a utf8 pointer for an existing char pointer. | |
utf8_pointer () | |
Create a utf8 pointer set to NULL. | |
Protected Attributes | |
uint8_t * | text |
This is a kind of "char *" for utf8 text.
Definition at line 387 of file unicode.h.
ucommon::utf8_pointer::utf8_pointer | ( | char * | string | ) |
ucommon::utf8_pointer::utf8_pointer | ( | utf8_pointer & | copy | ) |
char* ucommon::utf8_pointer::c_str | ( | void | ) | [inline] |
size_t ucommon::utf8_pointer::len | ( | void | ) | [inline] |
ucs4_t ucommon::utf8_pointer::operator * | ( | ) | [inline] |
ucommon::utf8_pointer::operator bool | ( | ) | [inline] |
ucommon::utf8_pointer::operator char * | ( | ) | [inline] |
bool ucommon::utf8_pointer::operator! | ( | ) | [inline] |
bool ucommon::utf8_pointer::operator!= | ( | char * | string | ) | [inline] |
utf8_pointer ucommon::utf8_pointer::operator+ | ( | long | offset | ) |
utf8_pointer& ucommon::utf8_pointer::operator++ | ( | ) |
utf8_pointer& ucommon::utf8_pointer::operator+= | ( | long | offset | ) |
Adjust utf8 pointer by specified codepoints forward.
offset | to increment by. |
utf8_pointer ucommon::utf8_pointer::operator- | ( | long | offset | ) |
utf8_pointer& ucommon::utf8_pointer::operator-- | ( | ) |
utf8_pointer& ucommon::utf8_pointer::operator-= | ( | long | offset | ) |
Adjust utf8 pointer by specified codepoints backward.
offset | to decrement by. |
utf8_pointer& ucommon::utf8_pointer::operator= | ( | char * | string | ) |
Assign a utf8 string to point to.
string | to point to. |
bool ucommon::utf8_pointer::operator== | ( | char * | string | ) | [inline] |
ucs4_t ucommon::utf8_pointer::operator[] | ( | long | codepoint | ) |
Extract a unicode character from a specified codepoint.
codepoint | offset to extract character from. |