summaryrefslogtreecommitdiffhomepage
path: root/src/java/nginx/unit
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@nginx.com>2022-10-27 13:22:19 +0200
committerAlejandro Colomar <alx@nginx.com>2022-11-16 13:04:08 +0100
commit5ab7ae702c0e4a65653ba346bd5bf20506224842 (patch)
tree7d3ab9ed2fece0db438e5f83b9cbb5e953de6805 /src/java/nginx/unit
parent647c349be1235ce9f43bb53d30e21f4e6dae0bd3 (diff)
downloadunit-5ab7ae702c0e4a65653ba346bd5bf20506224842.tar.gz
unit-5ab7ae702c0e4a65653ba346bd5bf20506224842.tar.bz2
Added nxt_usts2str() to make C strings from nxt_str_t.
This function is identical to nxt_ustr2str(), except that it takes a nxt_str_t structure as input, instead of a 'u_char *' and a size. The documentation of the function: /* * SYNOPSIS * void nxt_usts2str(char dst[restrict .src->length+1], * const nxt_str_t *restrict src); * * ARGUMENTS * dst Pointer to the first byte of the destination buffer. * src Pointer to the source Unterminated STring Structure. * * DESCRIPTION * Copy a string from the source nxt_str_t, which may be * not-NUL-terminated, into a NUL-terminated string in the * destination buffer. * * CAVEATS * If the destination buffer is not wider than the source buffer * at least by 1 byte, the behavior is undefined. * * EXAMPLES * nxt_str_t src = nxt_string("0123456789"); * char dst[src.length + 1]; * * nxt_usts2str(dst, &src); * * SEE ALSO * ustr2str(3), strlcpy(3), strscpy(9) */ Suggested-by: Andrew Clayton <a.clayton@nginx.com> Signed-off-by: Alejandro Colomar <alx@nginx.com>
Diffstat (limited to 'src/java/nginx/unit')
0 files changed, 0 insertions, 0 deletions