WPILibC++ 2027.0.0-alpha-3
Loading...
Searching...
No Matches
utf8_range.h
Go to the documentation of this file.
1#ifndef THIRD_PARTY_UTF8_RANGE_UTF8_RANGE_H_
2#define THIRD_PARTY_UTF8_RANGE_UTF8_RANGE_H_
3
4#include <stddef.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10// Returns 1 if the sequence of characters is a valid UTF-8 sequence, otherwise
11// 0.
12int utf8_range_IsValid(const char* data, size_t len);
13
14// Returns the length in bytes of the prefix of str that is all
15// structurally valid UTF-8.
16size_t utf8_range_ValidPrefix(const char* data, size_t len);
17
18#ifdef __cplusplus
19} // extern "C"
20#endif
21
22#endif // THIRD_PARTY_UTF8_RANGE_UTF8_RANGE_H_
int utf8_range_IsValid(const char *data, size_t len)
size_t utf8_range_ValidPrefix(const char *data, size_t len)