4#include "Stroika/Foundation/StroikaPreComp.h"
8#include "Stroika/Foundation/Containers/Common.h"
11#include "Stroika/Foundation/Math/Common.h"
13#include "String2Int.h"
23unsigned int Characters::HexString2Int (
const String& s)
26 unsigned long l = wcstoul (get<0> (s.
c_str (&sPossibleBackingStore)),
nullptr, 16);
27 if (l >= numeric_limits<unsigned int>::max ()) {
28 return numeric_limits<unsigned int>::max ();
38long long int Characters::Private_::String2Int_ (
const String& s)
41 wchar_t* endptr =
nullptr;
42 unsigned long long int l = wcstoll (get<0> (s.
c_str (&possibleBackingStore)), &endptr, 10);
43 return *endptr ==
'\0' ? l : 0;
51unsigned long long int Characters::Private_::String2UInt_ (
const String& s)
54 wchar_t* endptr =
nullptr;
55 long long int l = wcstoull (get<0> (s.
c_str (&possibleBackingStore)), &endptr, 10);
56 return *endptr ==
'\0' ? l : 0;
String is like std::u32string, except it is much easier to use, often much more space efficient,...
nonvirtual tuple< const wchar_t *, wstring_view > c_str(Memory::StackBuffer< wchar_t > *possibleBackingStore) const
Logically halfway between std::array and std::vector; Smart 'direct memory array' - which when needed...