|
libft
|
#include "libft.h"
Include dependency graph for ft_strtrim.c:Go to the source code of this file.
Functions | |
| char * | ft_strtrim (char const *s) |
| Trims whitespace from the start and end of a string. More... | |
| char* ft_strtrim | ( | char const * | s | ) |
Trims whitespace from the start and end of a string.
Allocates (with malloc) and returns a copy of the string given as argument without whitespaces at the beginning or at the end of the string. Will be considered as whitespaces the following characters ' ', '\n' and '\t'. If s has no whitespaces at the beginning or at the end, the function returns a copy of s.
| s | The string to be trimmed. |
s or NULL if allocation failed. Definition at line 34 of file ft_strtrim.c.
1.8.16