renamed: std::wstring Toa(...) -> std::wstring to_str(...)

added: std::string to_str(...)
pull/4/head
Tomasz Sowa 2 years ago
parent 448ad42961
commit f771f12027

@ -41,8 +41,64 @@
namespace PT
{
std::string to_str(unsigned long long value, int base)
{
std::string res;
Toa(value, res, false, base);
return res;
}
std::string to_str(long long value, int base)
{
std::string res;
Toa(value, res, false, base);
return res;
}
std::string to_str(unsigned long value, int base)
{
return to_str(static_cast<unsigned long long>(value), base);
}
std::string to_str(long value, int base)
{
return to_str(static_cast<long long>(value), base);
}
std::string to_str(unsigned int value, int base)
{
return to_str(static_cast<unsigned long long>(value), base);
}
std::string to_str(int value, int base)
{
return to_str(static_cast<long long>(value), base);
}
std::string to_str(unsigned short value, int base)
{
return to_str(static_cast<unsigned long long>(value), base);
}
std::string to_str(short value, int base)
{
return to_str(static_cast<long long>(value), base);
}
std::wstring Toa(unsigned long long value, int base)
std::wstring to_wstr(unsigned long long value, int base)
{
std::wstring res;
Toa(value, res, false, base);
@ -51,7 +107,7 @@ std::wstring Toa(unsigned long long value, int base)
}
std::wstring Toa(long long value, int base)
std::wstring to_wstr(long long value, int base)
{
std::wstring res;
Toa(value, res, false, base);
@ -60,39 +116,39 @@ std::wstring Toa(long long value, int base)
}
std::wstring Toa(unsigned long value, int base)
std::wstring to_wstr(unsigned long value, int base)
{
return Toa(static_cast<unsigned long long>(value), base);
return to_wstr(static_cast<unsigned long long>(value), base);
}
std::wstring Toa(long value, int base)
std::wstring to_wstr(long value, int base)
{
return Toa(static_cast<long long>(value), base);
return to_wstr(static_cast<long long>(value), base);
}
std::wstring Toa(unsigned int value, int base)
std::wstring to_wstr(unsigned int value, int base)
{
return Toa(static_cast<unsigned long long>(value), base);
return to_wstr(static_cast<unsigned long long>(value), base);
}
std::wstring Toa(int value, int base)
std::wstring to_wstr(int value, int base)
{
return Toa(static_cast<long long>(value), base);
return to_wstr(static_cast<long long>(value), base);
}
std::wstring Toa(unsigned short value, int base)
std::wstring to_wstr(unsigned short value, int base)
{
return Toa(static_cast<unsigned long long>(value), base);
return to_wstr(static_cast<unsigned long long>(value), base);
}
std::wstring Toa(short value, int base)
std::wstring to_wstr(short value, int base)
{
return Toa(static_cast<long long>(value), base);
return to_wstr(static_cast<long long>(value), base);
}

@ -270,14 +270,23 @@ void Toa(short value, StringType & res, bool clear_string = true, int base = 10)
std::wstring Toa(unsigned long long value, int base = 10);
std::wstring Toa(long long value, int base = 10);
std::wstring Toa(unsigned long value, int base = 10);
std::wstring Toa(long value, int base = 10);
std::wstring Toa(unsigned int value, int base = 10);
std::wstring Toa(int value, int base = 10);
std::wstring Toa(unsigned short value, int base = 10);
std::wstring Toa(short value, int base = 10);
std::string to_str(unsigned long long value, int base = 10);
std::string to_str(long long value, int base = 10);
std::string to_str(unsigned long value, int base = 10);
std::string to_str(long value, int base = 10);
std::string to_str(unsigned int value, int base = 10);
std::string to_str(int value, int base = 10);
std::string to_str(unsigned short value, int base = 10);
std::string to_str(short value, int base = 10);
std::wstring to_wstr(unsigned long long value, int base = 10);
std::wstring to_wstr(long long value, int base = 10);
std::wstring to_wstr(unsigned long value, int base = 10);
std::wstring to_wstr(long value, int base = 10);
std::wstring to_wstr(unsigned int value, int base = 10);
std::wstring to_wstr(int value, int base = 10);
std::wstring to_wstr(unsigned short value, int base = 10);
std::wstring to_wstr(short value, int base = 10);

Loading…
Cancel
Save