'\" t .\" Title: strlcpy .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Basic C Library Functions .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "STRLCPY" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Basic C Library Functions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" strlcpy \- Copy a C\-string into a sized buffer .SH "SYNOPSIS" .HP \w'size_t\ strlcpy('u .BI "size_t strlcpy(char\ *\ " "dest" ", const\ char\ *\ " "src" ", size_t\ " "size" ");" .SH "ARGUMENTS" .PP \fIdest\fR .RS 4 Where to copy the string to .RE .PP \fIsrc\fR .RS 4 Where to copy the string from .RE .PP \fIsize\fR .RS 4 size of destination buffer .RE .SH "DESCRIPTION" .PP Compatible with *BSD: the result is always a valid NUL\-terminated string that fits in the buffer (unless, of course, the buffer size is zero)\&. It does not pad out the result like \fBstrncpy\fR does\&. .SH "COPYRIGHT" .br