libft
|
#include "libft.h"
Go to the source code of this file.
Functions | |
char * | ft_strsub (char const *s, unsigned int start, size_t len) |
Copies a substring from a string. More... | |
char* ft_strsub | ( | char const * | s, |
unsigned int | start, | ||
size_t | len | ||
) |
Copies a substring from a string.
Allocates (with malloc
) and returns a “fresh” substring from the string given as argument. The substring begins at index start
and is of size len
. If start
and len
aren’t refering to a valid substring, the behavior is undefined.
s | The string from which create the substring. |
start | The start index of the substring. |
len | The size of the substring. |
NULL
if allocation failed. Definition at line 28 of file ft_strsub.c.