| 12345678910111213141516171819202122232425 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ft_cptcmp.c :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@student.42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2017/01/31 14:14:51 by bchanot #+# #+# */
- /* Updated: 2018/10/29 12:15:59 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "libft.h"
- size_t ft_cptcmp(const char *const s1, const char *const s2)
- {
- size_t i;
- i = 0;
- if (!s1 || !s2)
- return (0);
- while (s1[i] && s2[i] && s2[i] == s1[i])
- i++;
- return (i);
- }
|