| 1220 | } |
| 1221 | |
| 1222 | int str_utf8_check(const char *str) |
| 1223 | { |
| 1224 | int codepoint; |
| 1225 | while((codepoint = str_utf8_decode(&str))) |
| 1226 | { |
| 1227 | if(codepoint == -1) |
| 1228 | { |
| 1229 | return 0; |
| 1230 | } |
| 1231 | } |
| 1232 | return 1; |
| 1233 | } |
| 1234 | |
| 1235 | void str_utf8_copy_num(char *dst, const char *src, int dst_size, int num) |
| 1236 | { |