diff options
Diffstat (limited to '')
-rw-r--r-- | src/nxt_string.c | 2 | ||||
-rw-r--r-- | src/nxt_string.h | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/nxt_string.c b/src/nxt_string.c index 39f472e9..8c86f3b0 100644 --- a/src/nxt_string.c +++ b/src/nxt_string.c @@ -9,6 +9,8 @@ extern inline void nxt_ustr2str(char *restrict dst, const u_char *restrict src, size_t length); +extern inline void nxt_usts2str(char *restrict dst, + const nxt_str_t *restrict src); nxt_str_t * diff --git a/src/nxt_string.h b/src/nxt_string.h index 275a62ee..c6d6798e 100644 --- a/src/nxt_string.h +++ b/src/nxt_string.h @@ -60,6 +60,8 @@ struct nxt_str_s { NXT_EXPORT inline void nxt_ustr2str(char *restrict dst, const u_char *restrict src, size_t length); +NXT_EXPORT inline void nxt_usts2str(char *restrict dst, + const nxt_str_t *restrict src); NXT_EXPORT void nxt_memcpy_lowcase(u_char *dst, const u_char *src, size_t length); @@ -182,4 +184,11 @@ nxt_ustr2str(char *restrict dst, const u_char *restrict src, size_t length) } +inline void +nxt_usts2str(char *restrict dst, const nxt_str_t *restrict src) +{ + nxt_ustr2str(dst, src->start, src->length); +} + + #endif /* _NXT_STRING_H_INCLUDED_ */ |