ft_strcapitalize.c

This commit is contained in:
Timo Schmidt 2023-03-19 11:48:21 +01:00
parent c41701f2d9
commit ea50fc0232
1 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/19 11:27:43 by tischmid #+# #+# */
/* Updated: 2023/03/19 11:44:36 by tischmid ### ########.fr */
/* Updated: 2023/03/19 11:48:17 by tischmid ### ########.fr */
/* */
/* ************************************************************************** */
@ -14,8 +14,8 @@ char *ft_strcapitalize(char *str)
{
int i;
int inside_word;
int is_alpha;
int is_numeric;
int is_alpha;
int is_numeric;
char c;
inside_word = 0;
@ -23,8 +23,8 @@ char *ft_strcapitalize(char *str)
while (str[++i] != '\0')
{
c = str[i];
is_alpha = (c | 32) >= 'a' && (c | 32) <= 'z';
is_numeric = c >= '0' && c <= '9';
is_alpha = ((c | 32) >= 'a' && (c | 32) <= 'z');
is_numeric = (c >= '0' && c <= '9');
if (!inside_word && (is_alpha || is_numeric))
{
inside_word = 1;