Coverage report for server


src/
File: src/utils/strings.c
Date: 2024-06-25 10:57:05
Lines:
3/3
100.0%
Functions:
1/1
100.0%
Branches:
4/4
100.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2024
3 ** zappy
4 ** File description:
5 ** str_utils.c
6 */
7
8 #include <stdbool.h>
9 #include <ctype.h>
10 #include <stddef.h>
11
12 13 bool str_is_num(const char *str)
13 {
14
2/2
✓ Branch 0 taken 34 times.
✓ Branch 1 taken 12 times.
46 for (size_t i = 0; str[i]; i++) {
15
2/2
✓ Branch 0 taken 33 times.
✓ Branch 1 taken 1 times.
34 if (!isdigit(str[i]))
16 return false;
17 }
18 return true;
19 }
20