| 1234567891011121314151617181920212223242526272829 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ft_cptchar.c :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@students.42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2015/12/23 15:16:22 by bchanot #+# #+# */
- /* Updated: 2018/10/13 20:10:40 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "libft.h"
- size_t ft_cptchar(const char *src, char c)
- {
- size_t i;
- i = 0;
- if (!src || !c)
- return (0);
- while (*src)
- {
- if (*src == c)
- i++;
- src++;
- }
- return (i);
- }
|