bFound = MatchStr (sPattern, sString [, eCaseSensitivity])
Use MatchStr to search through a file, a listing of menu contents, or other collection of strings for a pattern.
[-] testcase MatchStrExample ()
[ ] LIST OF STRING lsFileNames // list of file names
[ ] INTEGER i // loop counter
[-] lsFileNames = {...}
[ ] "output.txt"
[ ] "c:\windows\partner.ini"
[ ] "c:\dos\*.txt"
[ ] "result.out"
[ ] "test.res"
[ ]
[ ] // print all file names that don't have a full path
[ ] // associated with them.
[-] for i = 1 to ListCount (lsFileNames)
[-] if (! MatchStr ("*:\*", lsFileNames[i]), CS_CASE_INSENSITIVE)
[ ] Print ("File has no path: ", lsFileNames[i])