| 67 | } |
| 68 | |
| 69 | static bool asciiStartsWith(SC::StringSpan text, SC::StringSpan prefix) |
| 70 | { |
| 71 | if (text.sizeInBytes() < prefix.sizeInBytes()) |
| 72 | { |
| 73 | return false; |
| 74 | } |
| 75 | const SC::Span<const char> textBytes = text.toCharSpan(); |
| 76 | const SC::Span<const char> prefixBytes = prefix.toCharSpan(); |
| 77 | return ::memcmp(textBytes.data(), prefixBytes.data(), prefixBytes.sizeInBytes()) == 0; |
| 78 | } |
| 79 | |
| 80 | static bool sessionIsAsciiWhiteSpace(char c) { return c == ' ' or c == '\t' or c == '\r' or c == '\n'; } |
| 81 |
no test coverage detected