add uppercase fn

This commit is contained in:
Mylloon 2022-11-17 23:17:45 +01:00
parent 37c9fb3445
commit f214991a8b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 14 additions and 0 deletions

7
includes/utils.h Normal file
View file

@ -0,0 +1,7 @@
#ifndef OTHELLO_UTILS_H
#define OTHELLO_UTILS_H 1
/* Transforme une lettre en majuscule */
void majuscule(char *lettre);
#endif

7
src/utils.c Normal file
View file

@ -0,0 +1,7 @@
#include "../includes/utils.h"
void majuscule(char *lettre) {
if (*lettre >= 'a' && *lettre <= 'z') {
*lettre -= 32;
}
}