Sun Java System Web Server 7.0 Update 4 NSAPI Developer's Guide

shexp_casecmp() Function

The shexp_casecmp function validates a specified shell expression and compares it with a specified string. This function returns one of three possible values representing match, no match, and invalid comparison. The comparison, in contrast to the comparison made by the shexp_cmp function is not case sensitive.

Use this function if you have a shell expression like * and make sure that a string matches it, such as


int shexp_casecmp(char *str, char *exp);

Return Values

0 if a match was found.

1 if no match was found.

-1 if the comparison resulted in an invalid expression.


char *str is the string to be compared.

char *exp is the shell expression (wildcard pattern) to compare against.

See Also

shexp_cmp() Function, shexp_match() Function, shexp_valid() Function