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

The file containing the my_strndup function. More...

#include "my.h"

Functions

char * my_strndup (char const *src, int n)
 Duplicates a string (src) with a defined size (n) and returns the new string.
 

Detailed Description

The file containing the my_strndup function.

Author
Nicolas TORO

Function Documentation

◆ my_strndup()

char * my_strndup ( const char * src,
int n )

Duplicates a string (src) with a defined size (n) and returns the new string.

Parameters
srcThe string to duplicate
nThe size of the string
Returns
char* The duplicated string
Author
Nicolas TORO