| 42 | } |
| 43 | |
| 44 | static bool asciiEqualsIgnoreCase(SC::StringSpan left, SC::StringSpan right) |
| 45 | { |
| 46 | if (left.sizeInBytes() != right.sizeInBytes()) |
| 47 | { |
| 48 | return false; |
| 49 | } |
| 50 | const SC::Span<const char> leftBytes = left.toCharSpan(); |
| 51 | const SC::Span<const char> rightBytes = right.toCharSpan(); |
| 52 | for (size_t idx = 0; idx < leftBytes.sizeInBytes(); ++idx) |
| 53 | { |
| 54 | if (asciiLower(leftBytes[idx]) != asciiLower(rightBytes[idx])) |
| 55 | { |
| 56 | return false; |
| 57 | } |
| 58 | } |
| 59 | return true; |
| 60 | } |
| 61 | |
| 62 | static bool asciiStartsWithIgnoreCase(SC::StringSpan text, SC::StringSpan prefix) |
| 63 | { |
no test coverage detected