From a2730ad965f2ecea9e080b1291646d2b69f7deff Mon Sep 17 00:00:00 2001 From: fdai7057 Date: Sat, 4 Feb 2023 12:54:59 +0100 Subject: [PATCH] refactoring: Rename one variable and replace decimal values with their character signs in order to increase comprehensibility and readability. --- src/stringManipulation.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stringManipulation.c b/src/stringManipulation.c index 09ebda7..29111f5 100644 --- a/src/stringManipulation.c +++ b/src/stringManipulation.c @@ -80,14 +80,14 @@ bool everyCharacterIsDigit(char *string) } bool isLetterOfAlphabet(char *string){ - bool r = true; + bool everyCharIsInAlphabet = true; for(int i=0;*(string+i)!='\0';++i){ - if( !(*(string+i)>=65&&*(string+i)<=90) && !(*(string+i)>=97&&*(string+i)<=122)){ - r = false; + if( !(*(string+i)>='A'&&*(string+i)<='Z') && !(*(string+i)>='a'&&*(string+i)<='z')){ + everyCharIsInAlphabet = false; break; } } - return r; + return everyCharIsInAlphabet; } unsigned int toUnsignedInteger(char *ID)