add uppercase fn
This commit is contained in:
parent
37c9fb3445
commit
f214991a8b
2 changed files with 14 additions and 0 deletions
7
includes/utils.h
Normal file
7
includes/utils.h
Normal 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
7
src/utils.c
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#include "../includes/utils.h"
|
||||||
|
|
||||||
|
void majuscule(char *lettre) {
|
||||||
|
if (*lettre >= 'a' && *lettre <= 'z') {
|
||||||
|
*lettre -= 32;
|
||||||
|
}
|
||||||
|
}
|
Reference in a new issue