tgrekov-libft
HIVE libft Oct 2023
Loading...
Searching...
No Matches
ft_strlcpy.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/24 14:26:19 by tgrekov #+# #+# */
/* Updated: 2023/11/09 20:06:35 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file ft_strlcpy.c.

#include "libft.h"
Include dependency graph for ft_strlcpy.c:

Go to the source code of this file.

Functions

size_t ft_strlcpy (char *dst, const char *src, size_t dstsize)
 Copy at most dstsize - 1 characters from string src into dst.
 

Function Documentation

◆ ft_strlcpy()

size_t ft_strlcpy ( char *  dst,
const char *  src,
size_t  dstsize 
)

Copy at most dstsize - 1 characters from string src into dst.

Null-terminates dst if dstsize != 0

Parameters
[in,out]dstPointer to allocated memory of at least ft_strlen(src) or dstsize size, whichever is smaller
[in]srcOptionally null-terminated string string
[in]dstsizeNumber of characters to copy, should be no greater than the allocated space at dst
Return values
size_tLength of src

Definition at line 36 of file ft_strlcpy.c.

References ft_strlen().

Here is the call graph for this function:
Here is the caller graph for this function: