25 while (
ft_strchr(set, s1[start_idx]) && start_idx < end_idx)
27 while (
ft_strchr(set, s1[end_idx]) && start_idx < end_idx)
29 ptr =
ft_substr(s1 + start_idx, 0, end_idx - start_idx + 1);
char * ft_strtrim(char const *s1, char const *set)
Trim start and end of a string.
char * ft_substr(char const *s, unsigned int start, size_t len)
Gets a piece of string out of a string.
char * ft_strchr(const char *s, int c)
Search a character.
size_t ft_strlen(const char *s)
Length of the string.