MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / IsUnicodeWhitespace

Function IsUnicodeWhitespace

common/values/string_value.cc:976–985  ·  view source on GitHub ↗

Per CEL spec, checking for Unicode whitespace.

Source from the content-addressed store, hash-verified

974
975// Per CEL spec, checking for Unicode whitespace.
976bool IsUnicodeWhitespace(char32_t c) {
977 if (c <= 0x0020) {
978 return c == 0x0020 || (c >= 0x0009 && c <= 0x000D);
979 }
980 if (c > 0x3000) return false;
981 if (c == 0x0085 || c == 0x00a0 || c == 0x1680) return true;
982 if (c >= 0x2000 && c <= 0x200a) return true;
983 return c == 0x2028 || c == 0x2029 || c == 0x202f || c == 0x205f ||
984 c == 0x3000;
985}
986
987std::pair<size_t, size_t> TrimImpl(absl::string_view string) {
988 absl::string_view temp_string = string;

Callers 1

TrimImplFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected