Wanted: string matching routine
Lloyd Kremer
kremer at cs.odu.edu
Thu Jun 27 22:24:05 AEST 1991
In article <2868E3EF.6133 at ics.uci.edu> vahid at vesta.ics.uci.edu (Frank Vahid) writes:
>Does anyone have a routine which is similar to strcmp, but permits
>unix-type wildcard characters in at least one of the strings?
>For example, strmatch("abc*", "abcdefg") would return a value denoting
>a successful match.
So would strncmp("abc", "abcdefg", 3).
While there is no wildcard capability in the str* routines, it is fairly
easy to combine them to produce the desired result.
Some almost have a 'grep' type of action like finding a substring within
a string.
Lloyd Kremer
Hilton Systems, Inc.
kremer at cs.odu.edu
More information about the Comp.lang.c
mailing list