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:
Tomasz Sowa 2009-11-24 20:39:36 +00:00
parent e083c5f889
commit 2d821bbad9
4 changed files with 74 additions and 4 deletions

View File

@ -36,10 +36,16 @@ Version 0.9.0 prerelease (2009.11.24):
* added: Parser::SetGroup(int g)
Parser::SetComma(int c, int c2 = 0)
Parser::SetParamSep(int s)
* added: uint Big::ToString(std::string & result, const Conv & conv)
uint Big::ToString(std::wstring & result, const Conv & conv)
std::string Big::ToString(const Conv & conv) const
std::string Big::ToString()
* 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)
uint Big::ToString(std::string & result, const Conv & conv)
uint Big::ToString(std::wstring & result, const Conv & conv)
std::string Big::ToString(const Conv & conv)
std::string Big::ToString()
std::wstring Big::ToWString(const Conv & conv)
std::wstring Big::ToWString()
* added: uint FromString(const char * source, const Conv & conv, const char **, bool *)
uint FromString(const wchar_t * source, const Conv & conv, const wchar_t **, bool *)
uint FromString(const std::string & string, const Conv & conv, const wchar_t **, bool *)

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: