Protocol Buffers - Google's data interchange format (grpc依赖) https://developers.google.com/protocol-buffers/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
540 B

#ifndef THIRD_PARTY_UTF8_RANGE_UTF8_RANGE_H_
#define THIRD_PARTY_UTF8_RANGE_UTF8_RANGE_H_
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Returns 1 if the sequence of characters is a valid UTF-8 sequence, otherwise
// 0.
int utf8_range_IsValid(const char* data, size_t len);
// Returns the length in bytes of the prefix of str that is all
// structurally valid UTF-8.
size_t utf8_range_ValidPrefix(const char* data, size_t len);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // THIRD_PARTY_UTF8_RANGE_UTF8_RANGE_H_