diff options
author | George Hazan <george.hazan@gmail.com> | 2015-12-21 14:26:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-12-21 14:26:08 +0000 |
commit | 3986b91d0e344e11b5953657fa1fb3e85d6da869 (patch) | |
tree | 8e27f4bb37db4fe8e279a9daab389bafb2498a21 /include | |
parent | 8b126dc48d0e4fc3585a723140f8da83a55eb5b3 (diff) |
hex2bin / hex2bin -> fast hex decoder from char / WCHAR to binary data
git-svn-id: http://svn.miranda-ng.org/main/trunk@15925 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r-- | include/m_core.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/m_core.h b/include/m_core.h index a9a900f03c..0231e3cdef 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -408,6 +408,9 @@ MIR_CORE_DLL(int) wildcmpiw(const wchar_t *name, const wchar_t *mask); MIR_CORE_DLL(char*) bin2hex(const void *pData, size_t len, char *dest);
MIR_CORE_DLL(wchar_t*) bin2hexW(const void *pData, size_t len, wchar_t *dest);
+MIR_CORE_DLL(bool) hex2bin(const char *pSrc, void *pData, size_t len);
+MIR_CORE_DLL(bool) hex2binW(const wchar_t *pSrc, void *pData, size_t len);
+
__forceinline char* lrtrim(char *str) { return ltrim(rtrim(str)); };
__forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); };
@@ -459,6 +462,7 @@ typedef union { #define replaceStrT replaceStrW
#define bin2hexT bin2hexW
+ #define hex2binT hex2binW
#define rtrimt rtrimw
#define ltrimt ltrimw
@@ -499,6 +503,7 @@ typedef union { #define replaceStrT replaceStr
#define bin2hexT bin2hex
+ #define hex2binT hex2bin
#define rtrimt rtrim
#define ltrimt ltrim
|