diff --git a/src/userinput.c b/src/userinput.c index 863c005..bd343e9 100644 --- a/src/userinput.c +++ b/src/userinput.c @@ -1 +1,15 @@ -#include "userinput.h" \ No newline at end of file +#include "userinput.h" + +#include +#include + +void trimLeft(char *input) { + size_t length = strlen(input); + int firstIndex = 0; + while (firstIndex < length && isspace(input[firstIndex])) { + firstIndex++; + } + for (int i = 0; i <= length - firstIndex; i++) { + input[i] = input[firstIndex + i]; + } +} \ No newline at end of file