From 92335f301702dea5cc76ff5d5a91df499536bf25 Mon Sep 17 00:00:00 2001 From: Eric Bagus Date: Thu, 8 Feb 2024 19:05:47 +0100 Subject: [PATCH] refactoring: descriptions to complex functions in operation handler --- src/operationHandler.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/operationHandler.c b/src/operationHandler.c index 519fc31..6fb44b8 100644 --- a/src/operationHandler.c +++ b/src/operationHandler.c @@ -38,6 +38,7 @@ int* evaluateInput(char* input, int operation) { return result; } +// formatting check of string bool containsTwoNumbers(const char* str) { int numbersCount = 0; bool hasSpace = false; @@ -62,6 +63,7 @@ bool containsTwoNumbers(const char* str) { return (numbersCount == 2 && hasSpace); } +// extracting of first number and removing from string int extractFirstNumber(char* str) { int number = 0; bool isInNumber = false;