![]() |
![]() |
|
Classes | |
struct | shwild_slice_t |
Length-aware string. More... | |
Typedefs | |
typedef struct shwild_handle_t_ * | shwild_handle_t |
Handle to compiled pattern. | |
Functions | |
int | shwild_match (char const *pattern, char const *string, unsigned flags) |
Matches a string against an shwild pattern. | |
int | shwild_match_s (shwild_slice_t const *pattern, shwild_slice_t const *string, unsigned flags) |
Synonym for shwild_match() using length-aware string arguments. | |
int | shwild_compile_pattern (char const *pattern, unsigned flags, shwild_handle_t *phCompiledPattern) |
Compiles a pattern into an efficient form for use in multiple match operations. | |
int | shwild_compile_pattern_s (shwild_slice_t const *pattern, unsigned flags, shwild_handle_t *phCompiledPattern) |
Synonym for shwild_compile_pattern() using length-aware string arguments. | |
int | shwild_match_pattern (shwild_handle_t hCompiledPattern, char const *string) |
Matches a string against against a pre-compiled shwild pattern. | |
int | shwild_match_pattern_s (shwild_handle_t hCompiledPattern, shwild_slice_t const *string) |
Synonym for shwild_match_pattern() using length-aware string arguments. | |
void | shwild_destroy_pattern (shwild_handle_t hCompiledPattern) |
Releases all resources associated with a pre-compiled shwild pattern. |
typedef struct shwild_handle_t_* shwild_handle_t |
Handle to compiled pattern.
Used by shwild_compile_pattern(), shwild_match_pattern() and shwild_destroy_pattern()
int shwild_compile_pattern | ( | char const * | pattern, | |
unsigned | flags, | |||
shwild_handle_t * | phCompiledPattern | |||
) |
Compiles a pattern into an efficient form for use in multiple match operations.
pattern | The shwild pattern against which matching will be performed | |
flags | Flags which moderate the search. | |
phCompiledPattern | Pointer to a variable to hold the compiled pattern |
<0 | The operation failed | |
>=0 | The operation succeeded. The value indicates the number of match sub-components created to represent the pattern. The compiled pattern must be destroyed when it is no longer needed, by shwild_destroy_pattern(), to avoid memory leaks. |
int shwild_compile_pattern_s | ( | shwild_slice_t const * | pattern, | |
unsigned | flags, | |||
shwild_handle_t * | phCompiledPattern | |||
) |
Synonym for shwild_compile_pattern() using length-aware string arguments.
void shwild_destroy_pattern | ( | shwild_handle_t | hCompiledPattern | ) |
Releases all resources associated with a pre-compiled shwild pattern.
hCompiledPattern | The pattern to be destroyed. |
int shwild_match | ( | char const * | pattern, | |
char const * | string, | |||
unsigned | flags | |||
) |
Matches a string against an shwild pattern.
pattern | The shwild pattern against which matching will be performed | |
string | The string to match against the pattern | |
flags | Flags which moderate the search. |
<0 | An error code (one of SHWILD_RC_*) | |
0 | The string matched the pattern | |
non-0 | The string did not match the pattern |
int shwild_match_pattern | ( | shwild_handle_t | hCompiledPattern, | |
char const * | string | |||
) |
Matches a string against against a pre-compiled shwild pattern.
hCompiledPattern | The precompiled shwild pattern against which matching will be performed | |
string | The string to match against the pattern |
0 | The string did not match the pattern | |
non-0 | The string matched against the pattern |
int shwild_match_pattern_s | ( | shwild_handle_t | hCompiledPattern, | |
shwild_slice_t const * | string | |||
) |
Synonym for shwild_match_pattern() using length-aware string arguments.
int shwild_match_s | ( | shwild_slice_t const * | pattern, | |
shwild_slice_t const * | string, | |||
unsigned | flags | |||
) |
Synonym for shwild_match() using length-aware string arguments.
|
b64 Library documentation © Synesis Software Pty Ltd, 2004-2012 |