diff options
author | B Stack <bgstack15@gmail.com> | 2020-08-31 20:07:13 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-08-31 20:07:13 -0400 |
commit | 8a27fa9c617533e76673ce61a65e2ba869b52208 (patch) | |
tree | acfdfb3e1046db87040477033fda0df76d92916a /zen/string_traits.h | |
parent | Merge branch '11.0' into 'master' (diff) | |
download | FreeFileSync-8a27fa9c617533e76673ce61a65e2ba869b52208.tar.gz FreeFileSync-8a27fa9c617533e76673ce61a65e2ba869b52208.tar.bz2 FreeFileSync-8a27fa9c617533e76673ce61a65e2ba869b52208.zip |
add upstream 11.1
Diffstat (limited to 'zen/string_traits.h')
-rw-r--r-- | zen/string_traits.h | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/zen/string_traits.h b/zen/string_traits.h index 76d601b3..333c92c7 100644 --- a/zen/string_traits.h +++ b/zen/string_traits.h @@ -7,33 +7,31 @@ #ifndef STRING_TRAITS_H_813274321443234 #define STRING_TRAITS_H_813274321443234 -#include <string_view> #include <cstring> //strlen +#include <string_view> #include "type_traits.h" //uniform access to string-like types, both classes and character arrays namespace zen { -/* -IsStringLikeV<>: - IsStringLikeV<const wchar_t*> //equals "true" - IsStringLikeV<const int*> //equals "false" - -GetCharTypeT<>: - GetCharTypeT<std::wstring> //equals wchar_t - GetCharTypeT<wchar_t[5]> //equals wchar_t - -strLength(): - strLength(str); //equals str.length() - strLength(array); //equals cStringLength(array) - -strBegin(): -> not null-terminated! -> may be nullptr if length is 0! - std::wstring str(L"dummy"); - char array[] = "dummy"; - strBegin(str); //returns str.c_str() - strBegin(array); //returns array -*/ +/* IsStringLikeV<>: + IsStringLikeV<const wchar_t*> //equals "true" + IsStringLikeV<const int*> //equals "false" + + GetCharTypeT<>: + GetCharTypeT<std::wstring> //equals wchar_t + GetCharTypeT<wchar_t[5]> //equals wchar_t + + strLength(): + strLength(str); //equals str.length() + strLength(array); //equals cStringLength(array) + + strBegin(): -> not null-terminated! -> may be nullptr if length is 0! + std::wstring str(L"dummy"); + char array[] = "dummy"; + strBegin(str); //returns str.c_str() + strBegin(array); //returns array */ //reference a sub-string for consumption by zen string_tools |