.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "BSON_STRNCPY" "3" "Apr 02, 2024" "1.26.2" "libbson" .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX void bson_strncpy (char *dst, const char *src, size_t size); .EE .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBdst\fP: The destination buffer. .IP \(bu 2 \fBsrc\fP: The src buffer. .IP \(bu 2 \fBsize\fP: The number of bytes to copy into dst, which must be at least that size. .UNINDENT .SH DESCRIPTION .sp Copies up to \fBsize\fP bytes from \fBsrc\fP into \fBdst\fP\&. \fBdst\fP must be at least \fBsize\fP bytes in size. A trailing \fB\e0\fP is always set. .sp Does nothing if \fBsize\fP is zero. .sp \fBbson_strncpy\fP matches the behavior of the C11 standard \fBstrncpy_s\fP, rather than \fBstrncpy\fP\&. This means that \fBbson_strncpy\fP always writes a null terminator to \fBdst\fP, even if \fBdst\fP is too short to fit the entire string from \fBsrc\fP\&. If there is additional space left in \fBdst\fP after copying \fBsrc\fP, \fBbson_strncpy\fP does not fill the remaining space with null characters. .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .