Skip to content

Commit 4523304

Browse files
committed
fix: support c
1 parent 77103c7 commit 4523304

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

include/is_utf8.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
#ifndef IS_UTF8
2+
#define IS_UTF8
3+
24
#include <stddef.h>
35

6+
#ifdef __cplusplus
7+
extern "C" {
8+
#endif
9+
410
// Check whether the provided string is UTF-8.
511
// The function is designed for use cases where
612
// 99.99% of the inputs are valid UTF-8.
713
// Thus the function unconditionally scans the
814
// whole input.
9-
extern "C" bool is_utf8(const char *src, size_t len);
15+
bool is_utf8(const char *src, size_t len);
16+
17+
#ifdef __cplusplus
18+
}
19+
#endif
20+
1021
#endif // IS_UTF8

0 commit comments

Comments
 (0)