diff options
Diffstat (limited to 'libft/src/ft_substr_s.c')
-rw-r--r-- | libft/src/ft_substr_s.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libft/src/ft_substr_s.c b/libft/src/ft_substr_s.c new file mode 100644 index 0000000..2bf4dd4 --- /dev/null +++ b/libft/src/ft_substr_s.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_substr_s.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:07:15 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:07:15 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include <libft.h> + +void ft_substr_s(char str[], const char *s, unsigned int start, size_t len) +{ + ft_strlcpy(str, s + start, len + 1); +} |