core/text/text_case.c
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /** | ||
| 2 | * @file text_case.c | ||
| 3 | * @brief Pure ascii case helpers, no SDK behind them. | ||
| 4 | * | ||
| 5 | * @ingroup lib_core | ||
| 6 | */ | ||
| 7 | #include "text/text_case.h" | ||
| 8 | |||
| 9 | 3 | void text_to_upper(char *s) | |
| 10 | { | ||
| 11 |
2/2✓ Branch 0 taken 18 times.
✓ Branch 1 taken 3 times.
|
21 | for (char *p = s; *p; p++) |
| 12 | { | ||
| 13 |
3/4✓ Branch 0 taken 12 times.
✓ Branch 1 taken 6 times.
✓ Branch 2 taken 12 times.
✗ Branch 3 not taken.
|
18 | if (*p >= 'a' && *p <= 'z') |
| 14 | { | ||
| 15 | 12 | *p -= 32; | |
| 16 | } | ||
| 17 | } | ||
| 18 | 3 | } | |
| 19 |