MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / fastfloat_strncasecmp

Function fastfloat_strncasecmp

source/extern/fast_float.h:353–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351// Compares two ASCII strings in a case insensitive manner.
352template <typename UC>
353inline FASTFLOAT_CONSTEXPR14 bool
354fastfloat_strncasecmp(UC const *input1, UC const *input2, size_t length) {
355 char running_diff{0};
356 for (size_t i = 0; i < length; ++i) {
357 running_diff |= (char(input1[i]) ^ char(input2[i]));
358 }
359 return (running_diff == 0) || (running_diff == 32);
360}
361
362#ifndef FLT_EVAL_METHOD
363#error "FLT_EVAL_METHOD should be defined, please include cfloat."

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected