tgrekov-ft_printf
HIVE printf Feb 2024
Loading...
Searching...
No Matches
ft_strnstr.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strnstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/25 12:42:03 by tgrekov #+# #+# */
/* Updated: 2023/11/09 20:05:15 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file ft_strnstr.c.

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

Go to the source code of this file.

Functions

char * ft_strnstr (const char *haystack, const char *needle, size_t len)
 Finds first occurence of needle in string haystack.
 

Function Documentation

◆ ft_strnstr()

char * ft_strnstr ( const char *  haystack,
const char *  needle,
size_t  len 
)

Finds first occurence of needle in string haystack.

Parameters
[in]haystackOptionally null-terminated string haystack to search
[in]needleNull-terminated string needle to find
[in]lenMaximum number of bytes to check
Return values
char*Pointer to the start of the first occurence of needle in haystack.
If not found within len characters or before termination of haystack, returns NULL.

Definition at line 33 of file ft_strnstr.c.