diff options
author | 2015-06-14 13:50:17 +0200 | |
---|---|---|
committer | 2015-06-14 13:50:17 +0200 | |
commit | b0149dad8a1cf9ae1dc87beaccd5b5170b700406 (patch) | |
tree | 002d0688482c4e072a3b2f219bf750e3cbb86fde /src/lib/util/unicode.c | |
parent | 9e10a6a35a53817742b340030fda456987e13144 (diff) | |
parent | 3b6a390069ec13e080fd497caa409360c54f0bf7 (diff) |
Merge pull request #2 from mamedev/master
merge with base
Diffstat (limited to 'src/lib/util/unicode.c')
-rw-r--r-- | src/lib/util/unicode.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lib/util/unicode.c b/src/lib/util/unicode.c index c87965415d7..7f264bc1fb6 100644 --- a/src/lib/util/unicode.c +++ b/src/lib/util/unicode.c @@ -308,6 +308,16 @@ int utf16f_from_uchar(utf16_char *utf16string, size_t count, unicode_char uchar) previous character in a string -------------------------------------------------*/ +/** + * @fn const char *utf8_previous_char(const char *utf8string) + * + * @brief UTF 8 previous character. + * + * @param utf8string The UTF 8string. + * + * @return null if it fails, else a char*. + */ + const char *utf8_previous_char(const char *utf8string) { while ((*--utf8string & 0xc0) == 0x80) @@ -322,6 +332,16 @@ const char *utf8_previous_char(const char *utf8string) UTF-8 characters -------------------------------------------------*/ +/** + * @fn int utf8_is_valid_string(const char *utf8string) + * + * @brief UTF 8 is valid string. + * + * @param utf8string The UTF 8string. + * + * @return An int. + */ + int utf8_is_valid_string(const char *utf8string) { int remaining_length = strlen(utf8string); |