mirror of
https://github.com/hanzoai/utf-8-validate.git
synced 2026-09-24 17:03:57 +00:00
11 lines
308 B
C
11 lines
308 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.
|
|
extern "C" bool is_utf8(const char *src, size_t len);
|
|
#endif // IS_UTF8
|