commit c5d1d0199bc0df1baef24fe1b79fa47f653062d9
parent 2c64e1cbb9c6842e52561a6c5629e768cfccd56d
Author: dwrz <dwrz@dwrz.net>
Date: Sun, 24 Feb 2019 12:59:21 +0000
Refactor lowercase to use char values, not pointers in c/isogram
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/c/isogram/src/isogram.c b/c/isogram/src/isogram.c
@@ -10,12 +10,12 @@ int length(const char string[])
return i+1; // Account for terminating null character.
}
-char lowercase(char* c) {
+char lowercase(char c) {
// Lowercase only ASCII capital characters.
- if (*c >= 65 && *c <= 90) {
- return *c + 32;
+ if (c >= 65 && c <= 90) {
+ return c + 32;
}
- return *c;
+ return c;
}
bool is_symbol_char(char c) {