MCPcopy Create free account
hub / github.com/apache/arrow / AsciiEqualsCaseInsensitive

Function AsciiEqualsCaseInsensitive

cpp/src/arrow/util/string.cc:167–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167bool AsciiEqualsCaseInsensitive(std::string_view left, std::string_view right) {
168 // TODO: ASCII validation
169 if (left.size() != right.size()) {
170 return false;
171 }
172 for (size_t i = 0; i < left.size(); ++i) {
173 if (std::tolower(static_cast<unsigned char>(left[i])) !=
174 std::tolower(static_cast<unsigned char>(right[i]))) {
175 return false;
176 }
177 }
178 return true;
179}
180
181std::string AsciiToLower(std::string_view value) {
182 // TODO: ASCII validation

Callers 6

ParseMethod · 0.85
TESTFunction · 0.85
ParseBooleanFunction · 0.85
operator==Method · 0.85

Calls 1

sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68