summaryrefslogtreecommitdiff
path: root/include/m_core.h
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/m_core.h
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/m_core.h')
-rw-r--r--include/m_core.h33
1 files changed, 26 insertions, 7 deletions
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);