Go to the source code of this file.
|
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...
|
|
|
const char | wild_prefix = '\\' |
| Character constant for the escape character in a wildcard pattern (SQL style). More...
|
|
const char | wild_one = '_' |
| Character constant for wildcard representing any one character (SQL style). More...
|
|
const char | wild_many = '%' |
| Character constant for wildcard representing zero or more characters (SQL style). More...
|
|
◆ wild_compare()
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.
- Deprecated:
- This function is not charset-aware, and should not be used in new code.
- Parameters
-
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. |
- Returns
- 0 if match, 1 otherwise
◆ wild_compare_full()
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".
- Deprecated:
- This function is not charset-aware, and should not be used in new code.
- Parameters
-
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 |
- Returns
- 0 if match, 1 otherwise
◆ wild_many
const char wild_many = '%' |
Character constant for wildcard representing zero or more characters (SQL style).
◆ wild_one
const char wild_one = '_' |
Character constant for wildcard representing any one character (SQL style).
◆ wild_prefix
const char wild_prefix = '\\' |
Character constant for the escape character in a wildcard pattern (SQL style).