diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-04-02 06:44:45 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-04-02 06:44:45 +0000 |
commit | a2b7cebbeaf9f85c93af56f11e593bd656a72cc2 (patch) | |
tree | 25924f734da91d0bde846957f0a0e5b8ca297554 /src/core/ngx_string.h | |
parent | d10e29e06d61d70ca119a3d8c40f3d2f2f7420db (diff) | |
download | nginx-a2b7cebbeaf9f85c93af56f11e593bd656a72cc2.tar.gz nginx-a2b7cebbeaf9f85c93af56f11e593bd656a72cc2.zip |
r2202, r2408, r2425, r2454, r2459, r2482, r2504, r2542, r2565, r2579,
r2580, r2585, r2586, r2587, r2591, r2626 merge:
try_files
Diffstat (limited to 'src/core/ngx_string.h')
-rw-r--r-- | src/core/ngx_string.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/ngx_string.h b/src/core/ngx_string.h index dfb3bc4cc..eff9e0be0 100644 --- a/src/core/ngx_string.h +++ b/src/core/ngx_string.h @@ -52,9 +52,25 @@ typedef struct { #define ngx_strstr(s1, s2) strstr((const char *) s1, (const char *) s2) -#define ngx_strchr(s1, c) strchr((const char *) s1, (int) c) #define ngx_strlen(s) strlen((const char *) s) +#define ngx_strchr(s1, c) strchr((const char *) s1, (int) c) + +static ngx_inline u_char * +ngx_strlchr(u_char *p, u_char *last, u_char c) +{ + while (p < last) { + + if (*p == c) { + return p; + } + + p++; + } + + return NULL; +} + /* * msvc and icc7 compile memset() to the inline "rep stos" |