* Validates if two string views are equal (based on length and contents). * Does an ordinal comparison of characters. */
| 112 | * Does an ordinal comparison of characters. |
| 113 | */ |
| 114 | inline static bool |
| 115 | StringViewEquals(const StringView *left, const StringView *right) |
| 116 | { |
| 117 | if (left == NULL && right == NULL) |
| 118 | { |
| 119 | return true; |
| 120 | } |
| 121 | |
| 122 | if ((left == NULL) ^ (right == NULL)) |
| 123 | { |
| 124 | return false; |
| 125 | } |
| 126 | |
| 127 | return left->length == right->length && |
| 128 | strncmp(left->string, right->string, left->length) == 0; |
| 129 | } |
| 130 | |
| 131 | |
| 132 | /* |
no outgoing calls
no test coverage detected