ucc::utf8_pointer Class Reference
Pointer to
utf8 encoded character data.
More...
#include <unicode.h>
Detailed Description
Pointer to
utf8 encoded character data.
This is a kind of "char *" for utf8 text.
- Author:
- David Sugar <dyfet@gnutelephony.org>
Definition at line 337 of file unicode.h.
Constructor & Destructor Documentation
ucc::utf8_pointer::utf8_pointer |
( |
char * |
string |
) |
|
Member Function Documentation
char* ucc::utf8_pointer::c_str |
( |
void |
|
) |
[inline] |
size_t ucc::utf8_pointer::len |
( |
void |
|
) |
[inline] |
ucc::utf8_pointer::operator bool |
( |
|
) |
[inline] |
Check if text is valid pointer.
- Returns:
- true if not NULL.
Definition at line 404 of file unicode.h.
ucc::utf8_pointer::operator char * |
( |
|
) |
[inline] |
bool ucc::utf8_pointer::operator! |
( |
|
) |
[inline] |
Check if text is an invalid pointer.
- Returns:
- false if not NULL.
Definition at line 411 of file unicode.h.
bool ucc::utf8_pointer::operator!= |
( |
char * |
string |
) |
[inline] |
check if pointer does not equal another string.
- Parameters:
-
- Returns:
- false if same memory address.
Definition at line 451 of file unicode.h.
ucs4_t ucc::utf8_pointer::operator* |
( |
|
) |
[inline] |
Get unicode character pointed to by pointer.
- Returns:
- unicode character we are pointing to.
Definition at line 458 of file unicode.h.
Get new utf8 string after adding a codepoint offset.
- Parameters:
-
- Returns:
- new utf8 pointer pointing to specified offset.
Iterative increment of a utf8 pointer to prior codepoint.
- Returns:
- object incremented.
Adjust utf8 pointer by specified codepoints forward.
- Parameters:
-
- Returns:
- object incremented.
Get new utf8 string after subtracting a codepoint offset.
- Parameters:
-
- Returns:
- new utf8 pointer pointing to specified offset.
Iterative decrement of a utf8 pointer to next codepoint.
- Returns:
- object decremented.
Adjust utf8 pointer by specified codepoints backward.
- Parameters:
-
- Returns:
- object decremented.
utf8_pointer& ucc::utf8_pointer::operator= |
( |
char * |
string |
) |
|
Assign a utf8 string to point to.
- Parameters:
-
- Returns:
- current object after set to string.
bool ucc::utf8_pointer::operator== |
( |
char * |
string |
) |
[inline] |
check if pointer equals another string.
- Parameters:
-
- Returns:
- true if same memory address.
Definition at line 443 of file unicode.h.
ucs4_t ucc::utf8_pointer::operator[] |
( |
long |
codepoint |
) |
|
Extract a unicode character from a specified codepoint.
- Parameters:
-
| codepoint | offset to extract character from. |
- Returns:
- unicode character or 0.
The documentation for this class was generated from the following file: