Files
utf-8-validate/deps/is_utf8/include/is_utf8.h
T
Luigi PincaandGitHub f51b7f1f15 [major] Use the is_utf8 library (#109)
Use the is_utf8 [1] library to greatly improve performance.

[1]: https://github.com/simdutf/is_utf8
2023-01-03 21:15:36 +01:00

10 lines
296 B
C

#ifndef IS_UTF8
#include <stddef.h>
// Check whether the provided string is UTF-8.
// The function is designed for use cases where
// 99.99% of the inputs are valid UTF-8.
// Thus the function unconditionally scans the
// whole input.
bool is_utf8(const char *src, size_t len);
#endif // IS_UTF8