[#CRYPTO_strndup] = CRYPTO_strndup :mrdocs: Duplicate at most `s` characters of `str` using the OpenSSL allocator. == Synopsis Declared in `<openssl/crypto.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- char* CRYPTO_strndup( char const* str, size_t s, char const* file, int line); ---- == Return Value Newly allocated NUL‐terminated copy, or NULL on failure. == Parameters [cols="1,4"] |=== | Name| Description | *str* | Source bytes (NUL‐terminated or truncated at `s).` | *s* | Maximum number of characters to copy (excluding the added NUL). | *file* | Source file name recorded with the allocation (usually *FILE*). | *line* | Source line recorded with the allocation (usually *LINE*). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#