Пример #1
0
char			*ft_strtrimall(char const *s, char c)
{
	if (!s)
		return (NULL);
	if (!ft_ltrim(ft_dtrim(s, c), c))
		return (NULL);
	return (ft_ltrim(ft_dtrim(s, c), c));
}
char	*ft_strtrim(const char *str)
{
	char	*tmp;

	tmp = ft_ltrim(str);
	tmp = ft_ltrim(tmp);
	return (tmp);
}
Пример #3
0
char			*ft_strtrim(char const *s)
{
	if (!s)
		return (NULL);
	if (!ft_ltrim(ft_dtrim(s)))
		return (NULL);
	return (ft_ltrim(ft_dtrim(s)));
}