summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index cf795e697..1581e3b26 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -1591,3 +1591,18 @@ inline int charlcat(char* x,char y,int z)
return v;
}
+bool charremove(char* mp, char remove)
+{
+ char* mptr = mp;
+ bool shift_down = false;
+ while (*mptr)
+ {
+ if (*mptr == remove)
+ shift_down = true;
+ if (shift_down)
+ *mptr = *(mptr+1);
+ *mptr++;
+ }
+ return shift_down;
+}
+