exercism

Exercism solutions.
Log | Files | Refs

commit 85199771575e2937bbcae73db7529afba864e0d7
parent 004533a2cbcb2a5cd216a83334dc8b583a0c9aab
Author: dwrz <dwrz@dwrz.net>
Date:   Sun, 24 Feb 2019 15:51:30 +0000

Refactor c/isogram/length to exclude null char

Since we're no longer copying, we don't need to include that char in our
length. It just adds an extra iteration step.

Diffstat:
Mc/isogram/src/isogram.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/isogram/src/isogram.c b/c/isogram/src/isogram.c @@ -4,7 +4,7 @@ int length(const char string[]) { int i = 0; while (string[i] != '\0') { i++; } - return i+1; // Account for terminating null char. + return i; } char lowercase(char c) {