ft_strlen.c 1013 B

1234567891011121314151617181920212223
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_strlen.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: mazimi <mazimi@student.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2014/11/03 15:02:39 by mazimi #+# #+# */
  9. /* Updated: 2016/06/13 13:54:40 by mazimi ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "../libft.h"
  13. size_t ft_strlen(char const *str)
  14. {
  15. int i;
  16. i = 0;
  17. while (str && str[i])
  18. i++;
  19. return (i);
  20. }