Per CEL spec, checking for Unicode whitespace.
| 974 | |
| 975 | // Per CEL spec, checking for Unicode whitespace. |
| 976 | bool 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 | |
| 987 | std::pair<size_t, size_t> TrimImpl(absl::string_view string) { |
| 988 | absl::string_view temp_string = string; |