4Test Code: To Match a string against List
[-] public Integer MatchList(String sPattern, LIST OF STRING lsInput) [ ] //To match one string with any item in list of strings [ ] //Returns the item value(integer) [ ] Integer iCount, iItem [ ] String sData, sTemp [ ] Integer iReturn = 0 [ ] [ ] iCount = ListCount(lsInput) [-] for iItem=1 to iCount [-] if (MatchStr(sPattern,lsInput[iItem])) [ ] iReturn = iItem [ ] break [ ] [ ] return iReturn
No comments:
Post a Comment