utf-8-validate/deps/is_utf8/include/is_utf8.h
raw| 1 | #ifndef IS_UTF8 |
| 2 | #include <stddef.h> |
| 3 | |
| 4 | // Check whether the provided string is UTF-8. |
| 5 | // The function is designed for use cases where |
| 6 | // 99.99% of the inputs are valid UTF-8. |
| 7 | // Thus the function unconditionally scans the |
| 8 | // whole input. |
| 9 | extern "C" bool is_utf8(const char *src, size_t len); |
| 10 | #endif // IS_UTF8 |