blob: 281f2fbba75bee593e02c461b30d72bd7e680261 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_get_map_dims.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/14 17:28:47 by rbousset #+# #+# */
/* Updated: 2020/02/14 17:28:47 by rbousset ### ########lyon.fr */
/* */
/* ************************************************************************** */
#include <libft.h>
#include <stdint.h>
size_t
ft_get_map_h(char **map)
{
size_t i;
i = 0;
while (map[i])
i++;
return (i);
}
size_t
ft_get_map_w(char **map)
{
size_t i;
size_t big;
size_t tmp;
i = 0;
big = 0;
tmp = 0;
while (map[i])
{
tmp = ft_strlen(map[i]);
if (tmp > big)
big = tmp;
i++;
}
return (big);
}
|