tgrekov-pipex
HIVE pipex May 2024
Loading...
Searching...
No Matches
ft_strtrim.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strtrim.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/26 15:00:51 by tgrekov #+# #+# */
/* Updated: 2023/11/09 20:54:21 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file ft_strtrim.c.

#include "libft.h"
Include dependency graph for ft_strtrim.c:

Go to the source code of this file.

Functions

char * ft_strtrim (char const *s1, char const *set)
 Allocates and returns a copy of s1 with any successive characters found in string set removed from the start and end.
 

Function Documentation

◆ ft_strtrim()

char * ft_strtrim ( char const *  s1,
char const *  set 
)

Allocates and returns a copy of s1 with any successive characters found in string set removed from the start and end.

Parameters
[in]s1Null-terminated string to trim
[in]setNull-terminated string containing characters to trim off s1
Return values
char*Pointer to allocated trimmed string

Definition at line 31 of file ft_strtrim.c.

References ft_strchr(), ft_strlcpy(), and ft_strlen().

Here is the call graph for this function: