From a28e57c6e0277a1d7346bec58cf557c52e337501 Mon Sep 17 00:00:00 2001 From: Dominik Kaiser Date: Mon, 24 Jun 2024 16:58:46 +0200 Subject: Add libft --- lib/libft/ft_strnstr.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 lib/libft/ft_strnstr.c (limited to 'lib/libft/ft_strnstr.c') diff --git a/lib/libft/ft_strnstr.c b/lib/libft/ft_strnstr.c new file mode 100644 index 0000000..373e90c --- /dev/null +++ b/lib/libft/ft_strnstr.c @@ -0,0 +1,47 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strnstr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: dkaiser */ + +/* int main(void) */ +/* { */ +/* char haystack[] = "abc"; */ +/* char needle[] = "abcde"; */ +/* size_t len = 5; */ + +/* printf("strnstr: %s\n", strnstr(haystack, needle, len)); */ +/* printf("ft_strnstr: %s\n", ft_strnstr(haystack, needle, len)); */ +/* } */ -- cgit v1.2.3