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

Function decBiStr

extern/decNumber/decCommon.c:190–197  ·  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, targ is the

Source from the content-addressed store, hash-verified

188/* if (decBiStr(test, "mike", "MIKE")) ... */
189/* ----------------------------------------------------------------- */
190static Flag decBiStr(const char *targ, const char *str1, const char *str2) {
191 for (;;targ++, str1++, str2++) {
192 if (*targ!=*str1 && *targ!=*str2) return 0;
193 // *targ has a match in one (or both, if terminator)
194 if (*targ=='\0') break;
195 } // forever
196 return 1;
197 } // decBiStr
198
199/* ------------------------------------------------------------------ */
200/* decFinalize -- adjust and store a final result */

Callers 1

decFloatFromStringFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected