libft: add functions to get the first character matching or not matching a predicate

This commit is contained in:
Khaïs COLIN 2025-02-14 15:06:01 +01:00
parent 8defbf4d13
commit ac10c3b4de
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
4 changed files with 67 additions and 1 deletions

View file

@ -6,7 +6,7 @@
/* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/17 16:06:09 by jguelen #+# #+# */
/* Updated: 2025/02/20 14:48:28 by khais ### ########.fr */
/* Updated: 2025/02/20 14:59:22 by khais ### ########.fr */
/* */
/* ************************************************************************** */
@ -14,6 +14,7 @@
# define LIBFT_H
# include <unistd.h>
# include <ctype.h>
# include <stdbool.h>
# include <string.h>
# include <strings.h>
# include <stdlib.h>
@ -132,6 +133,8 @@ int ft_tolower(int c);
char *ft_strchr(const char *s, int c);
size_t ft_strchridx(const char *s, char c);
size_t ft_strnchridx(const char *s, char c);
size_t ft_strfchridx(const char *s, bool f(char));
size_t ft_strnfchridx(const char *s, bool f(char));
char *ft_strrchr(const char *s, int c);
int ft_strcmp(const char *s1, const char *s2);
int ft_strncmp(const char *s1, const char *s2, size_t n);