int CHRBLK::CompVal(PVAL vp, int n) { ChkIndx(n); ChkTyp(vp); char *xvp = vp->GetCharValue(); // Get Value zero ended string bool ci = Ci || vp->IsCi(); // true if is case insensitive GetValPtrEx(n); // Get a zero ended string in Valp return (ci) ? stricmp(xvp, Valp) : strcmp(xvp, Valp); } // end of CompVal
int CHRBLK::Find(PVAL vp) { ChkTyp(vp); int i; bool ci = Ci || vp->IsCi(); PSZ s = vp->GetCharValue(); if (vp->IsNull()) return -1; for (i = 0; i < Nval; i++) { if (IsNull(i)) continue; GetValPtrEx(i); // Get a zero ended string in Valp if (!((ci) ? strnicmp(s, Valp, Long) : strncmp(s, Valp, Long))) break; } // endfor i return (i < Nval) ? i : (-1); } // end of Find