diff options
author | Chris Angelico <rosuav@gmail.com> | 2014-06-04 05:28:12 +1000 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-06-27 00:04:17 +0300 |
commit | c88987c1af10e19ab2703231d0702202127eb046 (patch) | |
tree | 6139a644cfdaed7f2f333fb53bdbe016a11ff71a /py/misc.h | |
parent | 12bc13eeb82592f768fb0e304bb9b6eaf1c2ce17 (diff) |
py: Implement basic unicode functions.
Diffstat (limited to 'py/misc.h')
-rw-r--r-- | py/misc.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -100,7 +100,9 @@ bool unichar_isupper(unichar c); bool unichar_islower(unichar c); unichar unichar_tolower(unichar c); unichar unichar_toupper(unichar c); -#define unichar_charlen(s, bytelen) (bytelen) +uint unichar_charlen(const char *str, uint len); +#define UTF8_IS_NONASCII(ch) ((ch) & 0x80) +#define UTF8_IS_CONT(ch) (((ch) & 0xC0) == 0x80) /** variable string *********************************************/ |