decc$match_wild

Matches a string to a pattern.

Format

#include  <unixlib.h>

int decc$match_wild  (char *test_string, char
                     *string_pattern);

Arguments

test_string
The address of a null-terminated string.
string_pattern
The address of a string containing the pattern to be matched. This pattern can contain wildcards (such as asterisks (*), question marks (?), and percent signs (%) as well as regular expressions (such as the range [a-z]).

Description

This routine determines whether the specified test string is a member of the set of strings specified by the pattern.

Return Values
1 (TRUE)  The string matches the pattern. 
0 (FALSE)  The string does not match the pattern. 

Example

    #include <unixlib.h>
    #include <stdio.h>
    int main(int argc, char *argv[])
            {
            if ( decc$match_wild( argv[1], argv[2] ) )
                  printf( "\n%s matches %s", argv[1], argv[2] );
            else
                  printf( "\n%s does not match %s", argv[1], argv[2] );
            }
    


Previous Page | Next Page | Table of Contents | Index