aboutsummaryrefslogtreecommitdiff
path: root/libft/src/str/ft_strcat3.c
diff options
context:
space:
mode:
Diffstat (limited to 'libft/src/str/ft_strcat3.c')
-rw-r--r--libft/src/str/ft_strcat3.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/libft/src/str/ft_strcat3.c b/libft/src/str/ft_strcat3.c
new file mode 100644
index 0000000..1f7c5df
--- /dev/null
+++ b/libft/src/str/ft_strcat3.c
@@ -0,0 +1,26 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_strcat3.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/04/05 12:53:05 by charles #+# #+# */
+/* Updated: 2020/04/05 12:55:49 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libft_str.h"
+
+/*
+** \brief Wrapper around ft_strcat to concatenate 3 strings
+** \param dest Destination of the concatenation
+** \param src1 First concatenation
+** \param src2 Second concatenation
+** \return Pointer to destination
+*/
+
+char *ft_strcat3(char *dest, const char *src1, const char *src2)
+{
+ return (ft_strcat(ft_strcat(dest, src1), src2));
+}