Apache2
String matching routines
Collaboration diagram for String matching routines:

Data Structures

struct  apr_strmatch_pattern
 

Typedefs

typedef struct apr_strmatch_pattern apr_strmatch_pattern
 

Functions

const char * apr_strmatch (const apr_strmatch_pattern *pattern, const char *s, apr_size_t slen)
 
const apr_strmatch_patternapr_strmatch_precompile (apr_pool_t *p, const char *s, int case_sensitive)
 

Detailed Description

Typedef Documentation

◆ apr_strmatch_pattern

Function Documentation

◆ apr_strmatch()

const char* apr_strmatch ( const apr_strmatch_pattern pattern,
const char *  s,
apr_size_t  slen 
)

Search for a precompiled pattern within a string

Parameters
patternThe pattern
sThe string in which to search for the pattern
slenThe length of s (excluding null terminator)
Returns
A pointer to the first instance of the pattern in s, or NULL if not found

◆ apr_strmatch_precompile()

const apr_strmatch_pattern* apr_strmatch_precompile ( apr_pool_t p,
const char *  s,
int  case_sensitive 
)

Precompile a pattern for matching using the Boyer-Moore-Horspool algorithm

Parameters
pThe pool from which to allocate the pattern
sThe pattern string
case_sensitiveWhether the matching should be case-sensitive
Returns
a pointer to the compiled pattern, or NULL if compilation fails