added: std::string UInt::ToString(uint b = 10)

std::wstring UInt::ToWString(uint b = 10)
        std::string  Int::ToString(uint b = 10)
        std::wstring Int::ToWString(uint b = 10)
        std::wstring Big::ToWString(const Conv & conv)
        std::wstring Big::ToWString()



git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@248 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2009-11-24 20:39:36 +00:00
parent e083c5f889
commit 2d821bbad9
4 changed files with 74 additions and 4 deletions

View File

@@ -2984,6 +2984,31 @@ public:
}
/*!
a method for converting into a string
struct Conv is defined in ttmathtypes.h, look there for more information about parameters
*/
std::wstring ToWString(const Conv & conv) const
{
std::wstring result;
ToStringBase<std::wstring, wchar_t>(result, conv);
return result;
}
/*!
a method for converting into a string
struct Conv is defined in ttmathtypes.h, look there for more information about parameters
*/
std::wstring ToWString() const
{
Conv conv;
return ToWString(conv);
}
private:

View File

@@ -985,6 +985,30 @@ public:
}
/*!
this method converts the value to a string with a base equal 'b'
*/
std::string ToString(uint b = 10) const
{
std::string result;
ToStringBase(result, b);
return result;
}
/*!
this method converts the value to a string with a base equal 'b'
*/
std::wstring ToWString(uint b = 10) const
{
std::wstring result;
ToStringBase(result, b);
return result;
}
private:
/*!

View File

@@ -2744,6 +2744,21 @@ public:
return ToStringBase(result, b);
}
std::string ToString(uint b = 10) const
{
std::string result;
ToStringBase(result, b);
return result;
}
std::wstring ToWString(uint b = 10) const
{
std::wstring result;
ToStringBase(result, b);
return result;
}
private: