From 8a27fa9c617533e76673ce61a65e2ba869b52208 Mon Sep 17 00:00:00 2001 From: B Stack Date: Mon, 31 Aug 2020 20:07:13 -0400 Subject: add upstream 11.1 --- zen/string_traits.h | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'zen/string_traits.h') 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 #include //strlen +#include #include "type_traits.h" //uniform access to string-like types, both classes and character arrays namespace zen { -/* -IsStringLikeV<>: - IsStringLikeV //equals "true" - IsStringLikeV //equals "false" - -GetCharTypeT<>: - GetCharTypeT //equals wchar_t - GetCharTypeT //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 //equals "true" + IsStringLikeV //equals "false" + + GetCharTypeT<>: + GetCharTypeT //equals wchar_t + GetCharTypeT //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 -- cgit