| 80 | static bool isAsciiWhiteSpace(char c) { return c == ' ' or c == '\t' or c == '\r' or c == '\n'; } |
| 81 | |
| 82 | static SC::StringSpan trimAsciiWhiteSpace(SC::Span<const char> span) |
| 83 | { |
| 84 | size_t start = 0; |
| 85 | size_t end = span.sizeInBytes(); |
| 86 | while (start < end and isAsciiWhiteSpace(span[start])) |
| 87 | { |
| 88 | start += 1; |
| 89 | } |
| 90 | while (end > start and isAsciiWhiteSpace(span[end - 1])) |
| 91 | { |
| 92 | end -= 1; |
| 93 | } |
| 94 | return {{span.data() + start, end - start}, false, SC::StringEncoding::Ascii}; |
| 95 | } |
| 96 | |
| 97 | static bool parseAsciiUint64(SC::StringSpan text, SC::uint64_t& value) |
| 98 | { |
no test coverage detected