MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / fastfloat_strncasecmp

Function fastfloat_strncasecmp

Source/external/fast_float.h:276–283  ·  view source on GitHub ↗

Compares two ASCII strings in a case insensitive manner.

Source from the content-addressed store, hash-verified

274
275// Compares two ASCII strings in a case insensitive manner.
276inline FASTFLOAT_CONSTEXPR14 bool
277fastfloat_strncasecmp(const char *input1, const char *input2, size_t length) {
278 char running_diff{0};
279 for (size_t i = 0; i < length; i++) {
280 running_diff |= (input1[i] ^ input2[i]);
281 }
282 return (running_diff == 0) || (running_diff == 32);
283}
284
285#ifndef FLT_EVAL_METHOD
286#error "FLT_EVAL_METHOD should be defined, please include cfloat."

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected