nxt_string.h (212:d532db63e8cb) nxt_string.h (216:07257705cd64)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#ifndef _NXT_STRING_H_INCLUDED_
8#define _NXT_STRING_H_INCLUDED_

--- 144 unchanged lines hidden (view full) ---

153
154#define \
155nxt_str_eq(s, p, _length) \
156 (((s)->length == _length) && (nxt_memcmp((s)->start, p, _length) == 0))
157
158
159#define \
160nxt_str_start(s, p, _length) \
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#ifndef _NXT_STRING_H_INCLUDED_
8#define _NXT_STRING_H_INCLUDED_

--- 144 unchanged lines hidden (view full) ---

153
154#define \
155nxt_str_eq(s, p, _length) \
156 (((s)->length == _length) && (nxt_memcmp((s)->start, p, _length) == 0))
157
158
159#define \
160nxt_str_start(s, p, _length) \
161 (((s)->length > _length) && (nxt_memcmp((s)->start, p, _length) == 0))
161 (((s)->length >= _length) && (nxt_memcmp((s)->start, p, _length) == 0))
162
163
164#define \
165nxt_strchr_eq(s, c) \
166 (((s)->length == 1) && ((s)->start[0] == c))
167
168
169#define \
170nxt_strchr_start(s, c) \
171 (((s)->length != 0) && ((s)->start[0] == c))
172
173
174#endif /* _NXT_STRING_H_INCLUDED_ */
162
163
164#define \
165nxt_strchr_eq(s, c) \
166 (((s)->length == 1) && ((s)->start[0] == c))
167
168
169#define \
170nxt_strchr_start(s, c) \
171 (((s)->length != 0) && ((s)->start[0] == c))
172
173
174#endif /* _NXT_STRING_H_INCLUDED_ */