From 2028bc4914638360fb756079dbddbdbe52676821 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 19 Jan 2022 22:55:22 +0800 Subject: ... --- include/cru/common/String.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/cru/common/String.hpp') diff --git a/include/cru/common/String.hpp b/include/cru/common/String.hpp index 8db012cb..e7688555 100644 --- a/include/cru/common/String.hpp +++ b/include/cru/common/String.hpp @@ -4,6 +4,7 @@ #include "Range.hpp" #include "StringUtil.hpp" +#include #include #include #include @@ -23,6 +24,9 @@ class StringView; class CRU_BASE_API String { public: + static double_conversion::StringToDoubleConverter + kDefaultStringToDoubleConverter; + using value_type = char16_t; using size_type = Index; using difference_type = Index; @@ -195,6 +199,8 @@ class CRU_BASE_API String { String& TrimEnd(); String& Trim(); + std::vector Split(value_type separator, + bool remove_space_line = false) const; std::vector SplitToLines(bool remove_space_line = false) const; bool StartWith(StringView str) const; @@ -225,6 +231,9 @@ class CRU_BASE_API String { int Compare(const String& other) const; + float ParseToFloat(Index* processed_characters_count = nullptr) const; + double ParseToDouble(Index* processed_characters_count = nullptr) const; + private: static char16_t kEmptyBuffer[1]; -- cgit v1.2.3