15static size_t ft_min(
size_t a,
size_t b)
22char *
ft_substr(
char const *s,
unsigned int start,
size_t len)
32 sub_len = ft_min(s_len, len);
35 ptr = (
char *)
ft_calloc(sub_len + 1,
sizeof(
char));
char * ft_substr(char const *s, unsigned int start, size_t len)
Gets a piece of string out of a string.
size_t ft_strlcpy(char *dst, const char *src, size_t dstsize)
Copies string to destination.
size_t ft_strlen(const char *s)
Length of the string.
void * ft_calloc(size_t count, size_t size)
Allocate and zero.