• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
7 extern "C" {
8 #endif
9 
10 // Returns 1 if the sequence of characters is a valid UTF-8 sequence, otherwise
11 // 0.
12 int 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.
16 size_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_
23