package.deps.is_utf8.include.is_utf8.h Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utf-8-validate Show documentation
Show all versions of utf-8-validate Show documentation
Check if a buffer contains valid UTF-8
The newest version!
#ifndef IS_UTF8
#include
// 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