mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
ngx_strlchr()
This commit is contained in:
parent
154013c5f3
commit
caa4a45c0f
@ -54,9 +54,25 @@ void ngx_strlow(u_char *dst, u_char *src, size_t n);
|
|||||||
|
|
||||||
|
|
||||||
#define ngx_strstr(s1, s2) strstr((const char *) s1, (const char *) s2)
|
#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_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"
|
* msvc and icc7 compile memset() to the inline "rep stos"
|
||||||
|
Loading…
Reference in New Issue
Block a user