Put stringtools into 'internal' namespace
This commit is contained in:
@@ -238,7 +238,7 @@ Value* CmdArgsInterface::ParseValue(const std::vector<std::string>& values, cons
|
||||
const std::string& val = values[0];
|
||||
|
||||
// String
|
||||
if (!StringTools::IsNumeric(val, true))
|
||||
if (!Internal::StringTools::IsNumeric(val, true))
|
||||
{
|
||||
rawInputType = DATA_TYPE::STRING;
|
||||
|
||||
@@ -280,7 +280,7 @@ Value* CmdArgsInterface::ParseValue(const std::vector<std::string>& values, cons
|
||||
bool isInt;
|
||||
long double num;
|
||||
|
||||
if (StringTools::ParseNumber(val, isInt, num))
|
||||
if (Internal::StringTools::ParseNumber(val, isInt, num))
|
||||
{
|
||||
rawInputType = isInt ? DATA_TYPE::INT : DATA_TYPE::FLOAT;
|
||||
|
||||
@@ -910,7 +910,7 @@ const ::Value* Parameter::GetValue() const
|
||||
|
||||
using namespace Hazelnp;
|
||||
|
||||
bool StringTools::Contains(const std::string& str, const char c)
|
||||
bool Internal::StringTools::Contains(const std::string& str, const char c)
|
||||
{
|
||||
for (const char& i : str)
|
||||
if (i == c)
|
||||
@@ -919,7 +919,7 @@ bool StringTools::Contains(const std::string& str, const char c)
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string StringTools::Replace(const std::string& str, const char find, const std::string& subst)
|
||||
std::string Internal::StringTools::Replace(const std::string& str, const char find, const std::string& subst)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
@@ -932,7 +932,7 @@ std::string StringTools::Replace(const std::string& str, const char find, const
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string StringTools::Replace(const std::string& str, const std::string& find, const std::string& subst)
|
||||
std::string Internal::StringTools::Replace(const std::string& str, const std::string& find, const std::string& subst)
|
||||
{
|
||||
if (find.length() == 0) return str;
|
||||
|
||||
@@ -961,7 +961,7 @@ std::string StringTools::Replace(const std::string& str, const std::string& find
|
||||
}
|
||||
|
||||
|
||||
bool StringTools::IsNumeric(const std::string& str, const bool allowDecimalPoint)
|
||||
bool Internal::StringTools::IsNumeric(const std::string& str, const bool allowDecimalPoint)
|
||||
{
|
||||
if (str.length() == 0) return false;
|
||||
|
||||
@@ -987,7 +987,7 @@ bool StringTools::IsNumeric(const std::string& str, const bool allowDecimalPoint
|
||||
return digitCount > 0;
|
||||
}
|
||||
|
||||
bool StringTools::ParseNumber(const std::string& str, bool& out_isInt, long double& out_number)
|
||||
bool Internal::StringTools::ParseNumber(const std::string& str, bool& out_isInt, long double& out_number)
|
||||
{
|
||||
bool isDecimal = false;
|
||||
|
||||
@@ -1030,14 +1030,14 @@ bool StringTools::ParseNumber(const std::string& str, bool& out_isInt, long doub
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<std::string> StringTools::SplitString(const std::string& str, const char delimiter)
|
||||
std::vector<std::string> Internal::StringTools::SplitString(const std::string& str, const char delimiter)
|
||||
{
|
||||
if (str.length() == 0) return std::vector<std::string>();
|
||||
|
||||
return SplitString(str, delimiter);
|
||||
}
|
||||
|
||||
std::vector<std::string> StringTools::SplitString(const std::string& str, const std::string& delimiter)
|
||||
std::vector<std::string> Internal::StringTools::SplitString(const std::string& str, const std::string& delimiter)
|
||||
{
|
||||
if (str.length() == 0) return std::vector<std::string>();
|
||||
|
||||
@@ -1078,7 +1078,7 @@ std::vector<std::string> StringTools::SplitString(const std::string& str, const
|
||||
return parts;
|
||||
}
|
||||
|
||||
std::string StringTools::ToLower(const std::string& str)
|
||||
std::string Internal::StringTools::ToLower(const std::string& str)
|
||||
{
|
||||
std::stringstream ss;
|
||||
for (std::size_t i = 0; i < str.length(); i++)
|
||||
|
||||
Reference in New Issue
Block a user