From b6a561f81c569ccc63423dc69eca4bc082ea60e9 Mon Sep 17 00:00:00 2001 From: iceyrazor Date: Fri, 27 Feb 2026 20:24:10 -0600 Subject: better pop fixed poping quotes that shouldnt be popdddd --- src/helper_functions.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/helper_functions.c') diff --git a/src/helper_functions.c b/src/helper_functions.c index c1931fd..162cf45 100644 --- a/src/helper_functions.c +++ b/src/helper_functions.c @@ -16,6 +16,22 @@ void *malloce(size_t size){ return mal; } +char *pop(char *token, int ch_i){ + if(token[ch_i]=='\0'){ + return token; + } + + char *right=(char*)malloce(sizeof(char)*strlen(token)+1); + + strcpy(right,&token[ch_i+1]); + token[ch_i]='\0'; + strcat(token,right); + + free(right); + return token; +} + + // You must free the result if result is non-NULL. char *str_replace(char *orig, char *rep, char *with) { char *result; // the return string -- cgit v1.3