strlcpy(9)

strlcpy9

Copy a c-string into a sized buffer

Usage

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

Overview

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.

Releases

6 releases since Debian 4.0 (Etch); the text changed 5 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.