Tizen Native API
|
Functions | |
size_t | eina_unicode_strlen (const Eina_Unicode *ustr) |
Returns the length of a Eina_Unicode string. | |
size_t | eina_unicode_strnlen (const Eina_Unicode *ustr, int n) |
Returns the length of a Eina_Unicode string, up to a limit. | |
Eina_Unicode * | eina_unicode_strdup (const Eina_Unicode *text) |
Same as the standard strdup just with Eina_Unicode instead of char. | |
Eina_Unicode * | eina_unicode_strndup (const Eina_Unicode *text, size_t n) |
Same as strdup but cuts on the given size. Assumes n < len. | |
int | eina_unicode_strcmp (const Eina_Unicode *a, const Eina_Unicode *b) 2) |
Same as the standard strcmp just with Eina_Unicode instead of char. | |
Eina_Unicode * | eina_unicode_strcpy (Eina_Unicode *dest, const Eina_Unicode *source) 2) |
Same as the standard strcpy just with Eina_Unicode instead of char. | |
Eina_Unicode * | eina_unicode_strstr (const Eina_Unicode *haystack, const Eina_Unicode *needle) 2) |
Same as the standard strstr just with Eina_Unicode instead of char. | |
Eina_Unicode * | eina_unicode_strncpy (Eina_Unicode *dest, const Eina_Unicode *source, size_t n) 2) |
Same as the standard strncpy just with Eina_Unicode instead of char. | |
Eina_Unicode * | eina_unicode_escape (const Eina_Unicode *str) |
Escapes a unicode string. | |
Eina_Unicode | eina_unicode_utf8_get_next (const char *buf, int *iindex) 2) |
Reads UTF8 bytes from buf, starting at iindex and returns the decoded code point at iindex offset, and advances iindex to the next code point after this. iindex is always advanced, unless the advancement is after NULL . On error, return a code point between DC80 and DCFF where the lower 8 bits are the byte's value. | |
Eina_Unicode | eina_unicode_utf8_get_prev (const char *buf, int *iindex) 2) |
Reads UTF8 bytes from buf, starting at iindex and returns the decoded code point at iindex offset, and moves iindex to the previous code point. iindex is always moved, as long as it's not past the start of the string. On error, return a code point between DC80 and DCFF where the lower 8 bits are the byte's value. | |
int | eina_unicode_utf8_get_len (const char *buf) |
Returns the number of unicode characters in the string. That is, the number of Eina_Unicodes it takes to store this string in an Eina_Unicode string. | |
Eina_Unicode * | eina_unicode_utf8_to_unicode (const char *utf, int *_len) |
Converts a UTF-8 string to a newly allocated Eina_Unicode string. | |
char * | eina_unicode_unicode_to_utf8 (const Eina_Unicode *uni, int *_len) |
Converts an Eina_Unicode string to a newly allocated UTF-8 string. | |
Typedefs | |
typedef unsigned int | Eina_Unicode |
A type that holds Unicode codepoints. |
This group discusses the functions that provide basic unicode string handling.
Eina_Unicode is a type that holds unicode codepoints.
Eina_Unicode* eina_unicode_escape | ( | const Eina_Unicode * | str | ) |
Escapes a unicode string.
[in] | str | The string to escape |
int eina_unicode_strcmp | ( | const Eina_Unicode * | a, |
const Eina_Unicode * | b | ||
) |
Same as the standard strcmp just with Eina_Unicode instead of char.
[in] | a | A string to be compared |
[in] | b | A string to be compared |
Eina_Unicode* eina_unicode_strcpy | ( | Eina_Unicode * | dest, |
const Eina_Unicode * | source | ||
) |
Same as the standard strcpy just with Eina_Unicode instead of char.
[in] | dest | The destination string |
[in] | source | The source string |
Eina_Unicode* eina_unicode_strdup | ( | const Eina_Unicode * | text | ) |
Same as the standard strdup just with Eina_Unicode instead of char.
[in] | text | The string to be duplicated |
size_t eina_unicode_strlen | ( | const Eina_Unicode * | ustr | ) |
Returns the length of a Eina_Unicode string.
This function returns the number of characters in a string.
[in] | ustr | The string to search |
Eina_Unicode* eina_unicode_strncpy | ( | Eina_Unicode * | dest, |
const Eina_Unicode * | source, | ||
size_t | n | ||
) |
Same as the standard strncpy just with Eina_Unicode instead of char.
[in] | dest | The destination string |
[in] | source | The source string |
[in] | n | Bytes to be copied |
Eina_Unicode* eina_unicode_strndup | ( | const Eina_Unicode * | text, |
size_t | n | ||
) |
Same as strdup but cuts on the given size. Assumes n < len.
This function duplicates text. The resulting string is cut on n. n is assumed to be lesser (<) than the length of text. When not needed anymore, the returned string must be freed.
[in] | text | The text to duplicate |
[in] | n | The maximum size of the text to duplicate |
size_t eina_unicode_strnlen | ( | const Eina_Unicode * | ustr, |
int | n | ||
) |
Returns the length of a Eina_Unicode string, up to a limit.
This function returns the number of characters in a string, up to a maximum of n. If the terminating character is not found in the string, it returns n.
[in] | ustr | The string to search |
[in] | n | The maximum length to search |
Eina_Unicode* eina_unicode_strstr | ( | const Eina_Unicode * | haystack, |
const Eina_Unicode * | needle | ||
) |
Same as the standard strstr just with Eina_Unicode instead of char.
[in] | haystack | The string |
[in] | needle | The substring to be found |
char* eina_unicode_unicode_to_utf8 | ( | const Eina_Unicode * | uni, |
int * | _len | ||
) |
Converts an Eina_Unicode string to a newly allocated UTF-8 string.
[in] | uni | The Eina_Unicode string |
[out] | _len | The length of the returned UTF-8 string in bytes |
int eina_unicode_utf8_get_len | ( | const char * | buf | ) |
Returns the number of unicode characters in the string. That is, the number of Eina_Unicodes it takes to store this string in an Eina_Unicode string.
[in] | buf | The string |
Eina_Unicode eina_unicode_utf8_get_next | ( | const char * | buf, |
int * | iindex | ||
) |
Reads UTF8 bytes from buf, starting at iindex and returns the decoded code point at iindex offset, and advances iindex to the next code point after this. iindex is always advanced, unless the advancement is after NULL
. On error, return a code point between DC80 and DCFF where the lower 8 bits are the byte's value.
[in] | buf | The string |
[out] | iindex | The index to look at and return from |
Eina_Unicode eina_unicode_utf8_get_prev | ( | const char * | buf, |
int * | iindex | ||
) |
Reads UTF8 bytes from buf, starting at iindex and returns the decoded code point at iindex offset, and moves iindex to the previous code point. iindex is always moved, as long as it's not past the start of the string. On error, return a code point between DC80 and DCFF where the lower 8 bits are the byte's value.
[in] | buf | The string |
[out] | iindex | The index to look at and return from |
0
if buf or iindex are NULL
Eina_Unicode* eina_unicode_utf8_to_unicode | ( | const char * | utf, |
int * | _len | ||
) |
Converts a UTF-8 string to a newly allocated Eina_Unicode string.
[in] | utf | The string in UTF-8 |
[out] | _len | The length of the returned Eina_Unicode string |
Same as the standard strlen just with Eina_Unicode instead of char.