MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / decBiStr

Function decBiStr

extern/decNumber/decNumber.c:7665–7672  ·  view source on GitHub ↗

------------------------------------------------------------------ */ decBiStr -- compare string with pairwise options */ / targ is the string to compare */ str1 is one of the strings to compare against (length may be 0) */ str2 is the other; it must be the same length as str1 */ / returns 1 if strings compare equal, (that is, it is

Source from the content-addressed store, hash-verified

7663/* if (decBiStr(test, "mike", "MIKE")) ... */
7664/* ------------------------------------------------------------------ */
7665static Flag decBiStr(const char *targ, const char *str1, const char *str2) {
7666 for (;;targ++, str1++, str2++) {
7667 if (*targ!=*str1 && *targ!=*str2) return 0;
7668 // *targ has a match in one (or both, if terminator)
7669 if (*targ=='\0') break;
7670 } // forever
7671 return 1;
7672 } // decBiStr
7673
7674/* ------------------------------------------------------------------ */
7675/* decNaNs -- handle NaN operand or operands */

Callers 1

decNumberFromStringFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected