42sh 1.0.0
Create a shell in C
Loading...
Searching...
No Matches
my_strncpy.c File Reference

The file containing the my_strncpy function. More...

#include "my.h"

Functions

char * my_strncpy (char *dest, char const *src, int n)
 Copies a string (src) and paste it on another string (dest) with a defined size (n)
 

Detailed Description

The file containing the my_strncpy function.

Author
Nicolas TORO

Function Documentation

◆ my_strncpy()

char * my_strncpy ( char * dest,
char const * src,
int n )

Copies a string (src) and paste it on another string (dest) with a defined size (n)

Note
The destination string must be allocated
Parameters
destThe destination string
srcThe source string
nThe size of the string
Returns
char* The destination string
Author
Nicolas TORO