MySQL 9.1.0
Source Code Documentation
|
Functions for comparing with wild-cards. More...
Functions | |
int | wild_compare_full (const char *str, int strlen, const char *wildstr, int wildlen, bool str_is_pattern, char w_prefix, char w_one, char w_many) |
Performs wildcard matching, aka globbing, on the input string with the given wildcard pattern, and the specified wildcard characters. More... | |
int | wild_compare (const char *str, int strlen, const char *wildstr, int wildlen, bool str_is_pattern) |
Performs wildcard matching, aka globbing, on the input string with the given wildcard pattern, using the standard SQL wildcard ('_', '' and '\') notation. More... | |
Functions for comparing with wild-cards.
int wild_compare | ( | const char * | str, |
int | strlen, | ||
const char * | wildstr, | ||
int | wildlen, | ||
bool | str_is_pattern | ||
) |
Performs wildcard matching, aka globbing, on the input string with the given wildcard pattern, using the standard SQL wildcard ('_', '' and '\') notation.
str | input which should be matched against pattern |
strlen | length of str in bytes |
wildstr | pattern with wildcards |
wildlen | length of wildstr in bytes |
str_is_pattern | if true the input string is considered to be a pattern, meaning that escape sequences in the input are processed as if they appeared in the pattern. |
int wild_compare_full | ( | const char * | str, |
int | strlen, | ||
const char * | wildstr, | ||
int | wildlen, | ||
bool | str_is_pattern, | ||
char | w_prefix, | ||
char | w_one, | ||
char | w_many | ||
) |
Performs wildcard matching, aka globbing, on the input string with the given wildcard pattern, and the specified wildcard characters.
Note that when str_is_pattern is true, an escaped wildcard in the pattern will only match an escaped wildcard in the string, e.g the string "my_1" will not be matched by the pattern "my\\_1".
str | input which should be matched against pattern |
strlen | length of str in bytes |
wildstr | pattern with wildcards |
wildlen | length of wildstr in bytes |
str_is_pattern | if true the input string is considered to be a pattern, meaning that escape sequences in the input are processed as if they appeared in the pattern |
w_one | wildcard character matching any single character |
w_many | wildcard character matching 0 or more characters |
w_prefix | escape character for the pattern |