Docs » Autodocs » dos.library » ParsePatternNoCase
ParsePatternNoCase -- Create a tokenized string for MatchPatternNoCase() (V37)
IsWild = ParsePatternNoCase(Source, Dest, DestLength) d0 D1 D2 D3 LONG ParsePatternNoCase(STRPTR, STRPTR, LONG)
Tokenizes a pattern, for use by MatchPatternNoCase(). Also indicates if there are any wildcards in the pattern (i.e. whether it might match more than one item). Note that Dest must be at least 2 times as large as Source plus 2 bytes. For a description of the wildcards, see ParsePattern().
source - unparsed wildcard string to search for. dest - output string, gets tokenized version of input. DestLength - length available in destination (should be at least as twice as large as source + 2 bytes).
IsWild - 1 means there were wildcards in the pattern, 0 means there were no wildcards in the pattern, -1 means there was a buffer overflow or other error
In V37 this call didn't always set IoErr() to something useful on an error. Fixed in V39. In V37, it didn't properly convert character-classes ([x-y]) to upper case. Workaround: convert the input pattern to upper case using ToUpper() from utility.library before calling ParsePatternNoCase(). Fixed in V39 dos.
ParsePattern(), MatchPatternNoCase(), MatchFirst(), MatchNext(), utility.library/ToUpper()
|