diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_core/src/mir_core.def | 2 | ||||
-rw-r--r-- | src/mir_core/src/mir_core64.def | 2 | ||||
-rw-r--r-- | src/mir_core/src/utils.cpp | 22 |
3 files changed, 26 insertions, 0 deletions
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 57f8bfcfd9..6ec2a2e42e 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -981,3 +981,5 @@ mir_strncmp @1138 mir_strncmpi @1139
mir_wstrncmp @1140
mir_wstrncmpi @1141
+strdel @1142
+strdelw @1143
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index c44c595634..07fe41af64 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -981,3 +981,5 @@ mir_strncmp @1138 mir_strncmpi @1139
mir_wstrncmp @1140
mir_wstrncmpi @1141
+strdel @1142
+strdelw @1143
diff --git a/src/mir_core/src/utils.cpp b/src/mir_core/src/utils.cpp index 5f4d0d063b..7ef78fd593 100644 --- a/src/mir_core/src/utils.cpp +++ b/src/mir_core/src/utils.cpp @@ -142,6 +142,28 @@ MIR_CORE_DLL(WCHAR*) ltrimpw(WCHAR *str) /////////////////////////////////////////////////////////////////////////////////////////
+MIR_CORE_DLL(char*) strdel(char *str, size_t len)
+{
+ char* p;
+ for (p = str + len; *p != 0; p++)
+ p[-len] = *p;
+
+ p[-len] = '\0';
+ return str;
+}
+
+MIR_CORE_DLL(wchar_t*) strdelw(wchar_t *str, size_t len)
+{
+ wchar_t* p;
+ for (p = str + len; *p != 0; p++)
+ p[-len] = *p;
+
+ p[-len] = '\0';
+ return str;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
MIR_CORE_DLL(int) wildcmp(const char *name, const char *mask)
{
if (name == NULL || mask == NULL)
|