summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-23 08:27:32 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-23 08:27:32 +0000
commit78a92aad0e3c2941b11b3115d9fd7aae44e5fc37 (patch)
tree28cf61c18a6d5d41bd2a1556b37b1f7026cb0ed0 /include
parent36ac355b3009665069258c76f9ce8b7f7229ece9 (diff)
- added unicode analogs of ltrim, ltrimp, wildcmp;
- wildcmpi[w] added git-svn-id: http://svn.miranda-ng.org/main/trunk@4511 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/delphi/m_core.inc11
-rw-r--r--include/m_core.h33
2 files changed, 37 insertions, 7 deletions
diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc
index 773b93a11c..5c550e109c 100644
--- a/include/delphi/m_core.inc
+++ b/include/delphi/m_core.inc
@@ -561,12 +561,23 @@ function wrtrim(str:pWideChar):pWideChar; stdcall;
// returns pointer to the beginning of string
function ltrim(str:pAnsiChar):pAnsiChar; stdcall;
external CoreDLL name 'ltrim';
+function ltrimw(str:pWideChar):pWideChar; stdcall;
+ external CoreDLL name 'ltrimw';
// returns pointer to the trimmed portion of string
function ltrimp(str:pAnsiChar):pAnsiChar; stdcall;
external CoreDLL name 'ltrimp';
+function ltrimpw(str:pWideChar):pWideChar; stdcall;
+ external CoreDLL name 'ltrimpw';
function wildcmp(name:pAnsiChar; mask:pAnsiChar):int; stdcall;
external CoreDLL name 'wildcmp';
+function wildcmpw(name:pWideChar; mask:pWideChar):int; stdcall;
+ external CoreDLL name 'wildcmpw';
+
+function wildcmpi(name:pAnsiChar; mask:pAnsiChar):int; stdcall;
+ external CoreDLL name 'wildcmpi';
+function wildcmpiw(name:pWideChar; mask:pWideChar):int; stdcall;
+ external CoreDLL name 'wildcmpiw';
// mir_free dest, mir_strdup src to dest
function replaceStr(var dest:pAnsiChar; const src:pAnsiChar):pAnsiChar; stdcall;
diff --git a/include/m_core.h b/include/m_core.h
index 87595defce..0b4fdf7ca6 100644
--- a/include/m_core.h
+++ b/include/m_core.h
@@ -463,19 +463,26 @@ MIR_CORE_DLL(WCHAR*) wrtrim(WCHAR *str);
#endif
MIR_CORE_DLL(char*) ltrim(char *str); // returns pointer to the beginning of string
+MIR_CORE_DLL(WCHAR*) ltrimw(WCHAR *str);
+
MIR_CORE_DLL(char*) ltrimp(char *str); // returns pointer to the trimmed portion of string
+MIR_CORE_DLL(WCHAR*) ltrimpw(WCHAR *str);
+
+MIR_CORE_DLL(int) wildcmp(const char *name, const char *mask);
+MIR_CORE_DLL(int) wildcmpw(const WCHAR *name, const WCHAR *mask);
-MIR_CORE_DLL(int) wildcmp(char *name, char *mask);
+MIR_CORE_DLL(int) wildcmpi(const char *name, const char *mask);
+MIR_CORE_DLL(int) wildcmpiw(const WCHAR *name, const WCHAR *mask);
-__forceinline char* lrtrim(char* str) { return ltrim(rtrim(str)); };
-__forceinline char* lrtrimp(char* str) { return ltrimp(rtrim(str)); };
+__forceinline char* lrtrim(char *str) { return ltrim(rtrim(str)); };
+__forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); };
#if defined( __cplusplus )
- MIR_CORE_DLL(char*) replaceStr( char* &dest, const char *src );
- MIR_CORE_DLL(WCHAR*) replaceStrW( WCHAR* &dest, const WCHAR *src );
+ MIR_CORE_DLL(char*) replaceStr(char* &dest, const char *src);
+ MIR_CORE_DLL(WCHAR*) replaceStrW(WCHAR* &dest, const WCHAR *src);
#else
- MIR_CORE_DLL(char*) replaceStr( char **dest, const char *src );
- MIR_CORE_DLL(WCHAR*) replaceStrW( WCHAR **dest, const WCHAR *src );
+ MIR_CORE_DLL(char*) replaceStr(char **dest, const char *src);
+ MIR_CORE_DLL(WCHAR*) replaceStrW(WCHAR **dest, const WCHAR *src);
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -495,6 +502,12 @@ __forceinline char* lrtrimp(char* str) { return ltrimp(rtrim(str)); };
#define mir_tstrdup mir_wstrdup
#define mir_tstrndup mir_wstrndup
#define replaceStrT replaceStrW
+
+ #define ltrimt ltrimw
+ #define ltrimpt ltrimpw
+
+ #define wildcmpt wildcmpw
+ #define wildcmpit wildcmpiw
#else
#define mir_t2a(s) mir_strdup(s)
#define mir_a2t(s) mir_strdup(s)
@@ -509,6 +522,12 @@ __forceinline char* lrtrimp(char* str) { return ltrimp(rtrim(str)); };
#define mir_tstrdup mir_strdup
#define mir_tstrndup mir_strndup
#define replaceStrT replaceStr
+
+ #define ltrimt ltrim
+ #define ltrimpt ltrimp
+
+ #define wildcmpt wildcmp
+ #define wildcmpit wildcmpi
#endif
MIR_CORE_DLL(WCHAR*) mir_a2u_cp(const char* src, int codepage);