mirror of
https://github.com/apache/httpd.git
synced 2025-07-30 20:03:10 +03:00
Add ap_regexec_len() function that works with non-null-terminated
strings. PR: 51231 Submitted by: Yehezkel Horowitz <horowity checkpoint com>, Stefan Fritsch git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1125802 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -123,6 +123,22 @@ AP_DECLARE(int) ap_regcomp(ap_regex_t *preg, const char *regex, int cflags);
|
||||
AP_DECLARE(int) ap_regexec(const ap_regex_t *preg, const char *string,
|
||||
apr_size_t nmatch, ap_regmatch_t *pmatch, int eflags);
|
||||
|
||||
/**
|
||||
* Match a string with given length against a pre-compiled regex. The string
|
||||
* does not need to be NUL-terminated.
|
||||
* @param preg The pre-compiled regex
|
||||
* @param buff The string to match
|
||||
* @param len Length of the string to match
|
||||
* @param nmatch Provide information regarding the location of any matches
|
||||
* @param pmatch Provide information regarding the location of any matches
|
||||
* @param eflags Bitwise OR of AP_REG_* flags (NOTBOL and NOTEOL supported,
|
||||
* other flags are ignored)
|
||||
* @return 0 for successful match, AP_REG_NOMATCH otherwise
|
||||
*/
|
||||
AP_DECLARE(int) ap_regexec_len(const ap_regex_t *preg, const char *buff,
|
||||
apr_size_t len, apr_size_t nmatch,
|
||||
ap_regmatch_t *pmatch, int eflags);
|
||||
|
||||
/**
|
||||
* Return the error code returned by regcomp or regexec into error messages
|
||||
* @param errcode the error code returned by regexec or regcomp
|
||||
|
Reference in New Issue
Block a user