From 73813b54cbfa2f6b40cbf6bd3a869fcbfe178607 Mon Sep 17 00:00:00 2001 From: fdai7057 Date: Mon, 6 Feb 2023 16:36:27 +0100 Subject: [PATCH] refactoring: Changed name of function charIsUp to characterIsUpperCase() and inner variable in order to increase readability. --- src/helperFunctions.c | 5 +++-- src/helperFunctions.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/helperFunctions.c b/src/helperFunctions.c index 2fd5249..71c6a63 100644 --- a/src/helperFunctions.c +++ b/src/helperFunctions.c @@ -137,8 +137,9 @@ double balanceToDouble(char *balanceAsString) } return sign * result / power; } -bool charIsUp(char c) + +bool characterIsUpperCase(char inputCharacter) { - bool result = (c>='A'&&c<='Z') ? true : false; + bool result = (inputCharacter>='A'&&inputCharacter<='Z') ? true : false; return result; } diff --git a/src/helperFunctions.h b/src/helperFunctions.h index ba68d57..64083d5 100644 --- a/src/helperFunctions.h +++ b/src/helperFunctions.h @@ -13,5 +13,5 @@ unsigned int power(unsigned int, unsigned int); bool everyCharacterIsDigit(char *); bool isLetterOfAlphabet(char *); double balanceToDouble(char *); -bool charIsUp(char ); +bool charIsUpperCase(char ); #endif