summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_substr_s.c
diff options
context:
space:
mode:
authorjoe <rbousset@42lyon.fr>2020-12-01 16:12:02 +0100
committerjoe <rbousset@42lyon.fr>2020-12-01 16:12:02 +0100
commit214eae8a55bde34ca412084bebdb378a696152cc (patch)
tree70404f68b1b86035fe4835d8cf2da61dcefc5eba /libft/src/ft_substr_s.c
parentNot quite done (diff)
download42-minishell-214eae8a55bde34ca412084bebdb378a696152cc.tar.gz
42-minishell-214eae8a55bde34ca412084bebdb378a696152cc.tar.bz2
42-minishell-214eae8a55bde34ca412084bebdb378a696152cc.tar.xz
42-minishell-214eae8a55bde34ca412084bebdb378a696152cc.tar.zst
42-minishell-214eae8a55bde34ca412084bebdb378a696152cc.zip
Bav
Diffstat (limited to 'libft/src/ft_substr_s.c')
-rw-r--r--libft/src/ft_substr_s.c18
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);
+}