libft
ft_strlast.c
Go to the documentation of this file.
1 /* ************************************************************************** */
3 /* */
4 /* ::: :::::::: */
5 /* ft_strlast.c :+: :+: :+: */
6 /* +:+ +:+ +:+ */
7 /* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8 /* +#+#+#+#+#+ +#+ */
9 /* Created: 2019/10/01 04:51:37 by unite #+# #+# */
10 /* Updated: 2020/07/16 02:44:58 by unite ### ########.fr */
11 /* */
12 /* ************************************************************************** */
13 
14 #include "libft.h"
15 
22 char ft_strlast(char const *str)
23 {
24  size_t i;
25 
26  i = 0;
27  while (str[i + 1])
28  i++;
29  return (str[i]);
30 }
libft.h
ft_strlast
char ft_strlast(char const *str)
Returns the last characters (other than NULL-termination) of a string.
Definition: ft_strlast.c:22