summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-09-01 15:17:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-09-01 15:17:39 +0000
commit1b9f36054bddeef87d4f9c139877d28c4e6b1702 (patch)
treed462cc03209954cf5d3c1172300c7645c0d19c3c /src/mir_core
parent039db3b302a3f7a3e78f89e430c8cb83efb12b5e (diff)
- strdel()/strdelw() moved to the core;
- custom implementations removed git-svn-id: http://svn.miranda-ng.org/main/trunk@15135 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/mir_core.def2
-rw-r--r--src/mir_core/src/mir_core64.def2
-rw-r--r--src/mir_core/src/utils.cpp22
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)