some improvements

This commit is contained in:
Jinhao
2015-02-17 04:03:55 +08:00
parent 4385ac623d
commit 0ffa3e54ca
10 changed files with 175 additions and 161 deletions

View File

@@ -133,6 +133,105 @@ namespace nana
#endif
}
std::wstring to_wstring(double v)
{
#ifdef NANA_MINGW
std::wstringstream ss;
ss << v;
return ss.str();
#else
return std::to_wstring(v);
#endif
}
std::wstring to_wstring(long double v)
{
#ifdef NANA_MINGW
std::wstringstream ss;
ss << v;
return ss.str();
#else
return std::to_wstring(v);
#endif
}
std::wstring to_wstring(unsigned v)
{
#ifdef NANA_MINGW
std::wstringstream ss;
ss << v;
return ss.str();
#else
return std::to_wstring(v);
#endif
}
std::wstring to_wstring(int v)
{
#ifdef NANA_MINGW
std::wstringstream ss;
ss << v;
return ss.str();
#else
return std::to_wstring(v);
#endif
}
std::wstring to_wstring(long v)
{
#ifdef NANA_MINGW
std::wstringstream ss;
ss << v;
return ss.str();
#else
return std::to_wstring(v);
#endif
}
std::wstring to_wstring(unsigned long v)
{
#ifdef NANA_MINGW
std::wstringstream ss;
ss << v;
return ss.str();
#else
return std::to_wstring(v);
#endif
}
std::wstring to_wstring(long long v)
{
#ifdef NANA_MINGW
std::wstringstream ss;
ss << v;
return ss.str();
#else
return std::to_wstring(v);
#endif
}
std::wstring to_wstring(unsigned long long v)
{
#ifdef NANA_MINGW
std::wstringstream ss;
ss << v;
return ss.str();
#else
return std::to_wstring(v);
#endif
}
std::wstring to_wstring(float v)
{
#ifdef NANA_MINGW
std::wstringstream ss;
ss << v;
return ss.str();
#else
return std::to_wstring(v);
#endif
}
bool is_incomplete(const nana::string& str, unsigned pos)
{
#ifndef NANA_UNICODE