---
name: "strlcpy"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/strlcpy/9"
---

# strlcpy(9)

Copy a C-string into a sized buffer

## NAME

strlcpy - Copy a C-string into a sized buffer

## SYNOPSIS

**size\_t strlcpy(char \*** *dest***, const char \*** *src***, size\_t** *size***);**

## ARGUMENTS

*dest*

Where to copy the string to

*src*

Where to copy the string from

*size*

size of destination buffer

## DESCRIPTION

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 **strncpy** does.

## COPYRIGHT
