|
M_utf8_error_t | M_utf8_toupper_cp (M_uint32 cp, M_uint32 *upper_cp) |
|
M_utf8_error_t | M_utf8_toupper_chr (const char *str, char *buf, size_t buf_size, size_t *len, const char **next) |
|
M_utf8_error_t | M_utf8_toupper_chr_buf (const char *str, M_buf_t *buf, const char **next) |
|
M_utf8_error_t | M_utf8_toupper (const char *str, char **out) |
|
M_utf8_error_t | M_utf8_toupper_buf (const char *str, M_buf_t *buf) |
|
M_utf8_error_t | M_utf8_tolower_cp (M_uint32 cp, M_uint32 *lower_cp) |
|
M_utf8_error_t | M_utf8_tolower_chr (const char *str, char *buf, size_t buf_size, size_t *len, const char **next) |
|
M_utf8_error_t | M_utf8_tolower_chr_buf (const char *str, M_buf_t *buf, const char **next) |
|
M_utf8_error_t | M_utf8_tolower (const char *str, char **out) |
|
M_utf8_error_t | M_utf8_tolower_buf (const char *str, M_buf_t *buf) |
|
M_utf8_error_t | M_utf8_totitle_cp (M_uint32 cp, M_uint32 *title_cp) |
|
M_utf8_error_t | M_utf8_totitle_chr (const char *str, char *buf, size_t buf_size, size_t *len, const char **next) |
|
M_utf8_error_t | M_utf8_totitle_chr_buf (const char *str, M_buf_t *buf, const char **next) |
|
M_utf8_error_t | M_utf8_totitle (const char *str, char **out) |
|
M_utf8_error_t | M_utf8_totitle_buf (const char *str, M_buf_t *buf) |
|
The case folding as defined by the official UTF-8 mapping is utalized. UTF-8 does not have a one to one mapping for case folding. Multiple codes can fold to the same code point. Coversion to upper, then to lower, then back to upper can result in a different upper case string than the original input.
For example, 0x004B (capital K) maps to 0x006B (lower k). 0x212A (kelvin sign) also maps to 0x006B. 0x006B maps to 0x004B. So converting 0x212A to lower then back to upper will output 0x004B.
- Note
- Not all characters have a case equivalent. These characters will return themselves when folded.
◆ M_utf8_toupper_cp()
Convert a code point to the equivalent upper case code point.
- Parameters
-
[in] | cp | Code point to convert. |
[out] | upper_cp | Equivalent upper case code point. Or cp if there is no equivalent. |
- Returns
- Result.
◆ M_utf8_toupper_chr()
M_utf8_error_t M_utf8_toupper_chr |
( |
const char * |
str, |
|
|
char * |
buf, |
|
|
size_t |
buf_size, |
|
|
size_t * |
len, |
|
|
const char ** |
next |
|
) |
| |
Read a utf-8 sequence converting to upper case.
Output is not NULL terminated.
- Parameters
-
[in] | str | utf-8 string. |
[in] | buf | Buffer to put utf-8 sequence. Can be NULL. |
[in] | buf_size | Size of the buffer. |
[out] | len | Length of the sequence that was put into buffer. |
[out] | next | Start of next character. Will point to NULL terminator if last character. |
- Returns
- Result.
◆ M_utf8_toupper_chr_buf()
Read a utf-8 sequence into an M_buf_t converting to upper case.
- Parameters
-
[in] | str | utf-8 string. |
[in] | buf | Buffer to put upper case utf-8 sequence. |
[out] | next | Start of next character. Will point to NULL terminator if last character. |
- Returns
- Result.
◆ M_utf8_toupper()
Convert a utf-8 string to an upper case equivalent string.
- Parameters
-
[in] | str | utf-8 string. |
[out] | out | Upper case utf-8 string. |
- Returns
- Result.
◆ M_utf8_toupper_buf()
Read a utf-8 string into an M_buf_t converting to upper case.
- Parameters
-
[in] | str | utf-8 string. |
[in] | buf | Buffer to put upper case utf-8 string. |
- Returns
- Result.
◆ M_utf8_tolower_cp()
Convert a code point to the equivalent loer case code point.
- Parameters
-
[in] | cp | Code point to convert. |
[out] | lower_cp | Equivalent lower case code point. Or cp if there is no equivalent. |
- Returns
- Result.
◆ M_utf8_tolower_chr()
M_utf8_error_t M_utf8_tolower_chr |
( |
const char * |
str, |
|
|
char * |
buf, |
|
|
size_t |
buf_size, |
|
|
size_t * |
len, |
|
|
const char ** |
next |
|
) |
| |
Read a utf-8 sequence converting to lower case.
Output is not NULL terminated.
- Parameters
-
[in] | str | utf-8 string. |
[in] | buf | Buffer to put utf-8 sequence. Can be NULL. |
[in] | buf_size | Size of the buffer. |
[out] | len | Length of the sequence that was put into buffer. |
[out] | next | Start of next character. Will point to NULL terminator if last character. |
- Returns
- Result.
◆ M_utf8_tolower_chr_buf()
Read a utf-8 sequence into an M_buf_t converting to lower case.
- Parameters
-
[in] | str | utf-8 string. |
[in] | buf | Buffer to put lower case utf-8 sequence. |
[out] | next | Start of next character. Will point to NULL terminator if last character. |
- Returns
- Result.
◆ M_utf8_tolower()
Convert a utf-8 string to an lower case equivalent string.
- Parameters
-
[in] | str | utf-8 string. |
[out] | out | Lower case utf-8 string. |
- Returns
- Result.
◆ M_utf8_tolower_buf()
Read a utf-8 string into an M_buf_t converting to lower case.
- Parameters
-
[in] | str | utf-8 string. |
[in] | buf | Buffer to put lower case utf-8 string. |
- Returns
- Result.
◆ M_utf8_totitle_cp()
Convert a code point to the equivalent title case code point.
- Parameters
-
[in] | cp | Code point to convert. |
[out] | title_cp | Equivalent title case code point. Or cp if there is no equivalent. |
- Returns
- Result.
◆ M_utf8_totitle_chr()
M_utf8_error_t M_utf8_totitle_chr |
( |
const char * |
str, |
|
|
char * |
buf, |
|
|
size_t |
buf_size, |
|
|
size_t * |
len, |
|
|
const char ** |
next |
|
) |
| |
Read a utf-8 sequence converting to title case.
Output is not NULL terminated.
- Parameters
-
[in] | str | utf-8 string. |
[in] | buf | Buffer to put utf-8 sequence. Can be NULL. |
[in] | buf_size | Size of the buffer. |
[out] | len | Length of the sequence that was put into buffer. |
[out] | next | Start of next character. Will point to NULL terminator if last character. |
- Returns
- Result.
◆ M_utf8_totitle_chr_buf()
Read a utf-8 sequence into an M_buf_t converting to title case.
- Parameters
-
[in] | str | utf-8 string. |
[in] | buf | Buffer to put title case utf-8 sequence. |
[out] | next | Start of next character. Will point to NULL terminator if last character. |
- Returns
- Result.
◆ M_utf8_totitle()
Convert a utf-8 string to an title case equivalent string.
- Parameters
-
[in] | str | utf-8 string. |
[out] | out | Lower case utf-8 string. |
- Returns
- Result.
◆ M_utf8_totitle_buf()
Read a utf-8 string into an M_buf_t converting to title case.
- Parameters
-
[in] | str | utf-8 string. |
[in] | buf | Buffer to put title case utf-8 string. |
- Returns
- Result.