aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/util.c b/util.c
index 0d8f7c6..ca793ce 100644
--- a/util.c
+++ b/util.c
@@ -154,3 +154,10 @@ int digits(int num) {
int streq(const char* first, const char* second) {
return strcmp(first, second) == 0;
}
+
+void shiftLeft(char* str, size_t size, size_t shift) {
+ while (*(str + shift - 1) != '\0') {
+ *str = *(str + shift);
+ str++;
+ }
+}