-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strlen_until.c
23 lines (20 loc) · 1.02 KB
/
ft_strlen_until.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen_until.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmoska <tmoska@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/19 16:41:03 by tmoska #+# #+# */
/* Updated: 2017/02/22 21:10:10 by tmoska ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_strlen_until(const char *str, char c)
{
const char *s;
s = str;
while (*s != c && *s)
++s;
return (s - str);
}