libft
Loading...
Searching...
No Matches
ft_substr.c File Reference
#include "libft.h"

Go to the source code of this file.

Functions

char * ft_substr (char const *s, unsigned int start, size_t len)
 Gets a piece of string out of a string.
 

Function Documentation

◆ ft_substr()

char * ft_substr ( char const *  s,
unsigned int  start,
size_t  len 
)

Gets a piece of string out of a string.

Gets len length piece of string from a strung starting at index start.

Parameters
sString
startStarting index
lenHow many chars
Returns
char* Address of the new substring
Attention
Allocates memory

Definition at line 22 of file ft_substr.c.