aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Ryan <jeffreyryan@tutanota.com>2022-05-23 15:52:01 -0500
committerJeffrey Ryan <jeffreyryan@tutanota.com>2022-05-23 16:03:42 -0500
commit3ee217489220fc9cf27e3c81a743648bfad95126 (patch)
tree0b0ee58590c39d8bc9410fe113cf3cf4d9c8a7a5
parenthttp_server_handlers_map2: dead macros (diff)
downloadmonero-3ee217489220fc9cf27e3c81a743648bfad95126.tar.xz
string_coding: unused functions
-rw-r--r--contrib/epee/include/string_coding.h94
1 files changed, 0 insertions, 94 deletions
diff --git a/contrib/epee/include/string_coding.h b/contrib/epee/include/string_coding.h
index 82050ef96..0d9c6c244 100644
--- a/contrib/epee/include/string_coding.h
+++ b/contrib/epee/include/string_coding.h
@@ -34,100 +34,6 @@ namespace epee
{
namespace string_encoding
{
- inline std::string convert_to_ansii(const std::wstring& str_from)
- {
-
- std::string res(str_from.begin(), str_from.end());
- return res;
- /*
- std::string result;
- std::locale loc;
- for(unsigned int i= 0; i < str_from.size(); ++i)
- {
- result += std::use_facet<std::ctype<wchar_t> >(loc).narrow(str_from[i]);
- }
- return result;
- */
-
- //return boost::lexical_cast<std::string>(str_from);
- /*
- std::string str_trgt;
- if(!str_from.size())
- return str_trgt;
- int cb = ::WideCharToMultiByte( code_page, 0, str_from.data(), (__int32)str_from.size(), 0, 0, 0, 0 );
- if(!cb)
- return str_trgt;
- str_trgt.resize(cb);
- ::WideCharToMultiByte( code_page, 0, str_from.data(), (int)str_from.size(),
- (char*)str_trgt.data(), (int)str_trgt.size(), 0, 0);
- return str_trgt;*/
- }
-
- inline std::string convert_to_ansii(const std::string& str_from)
- {
- return str_from;
- }
-
- inline std::wstring convert_to_unicode(const std::string& str_from)
- {
- std::wstring result;
- std::locale loc;
- for(unsigned int i= 0; i < str_from.size(); ++i)
- {
- result += std::use_facet<std::ctype<wchar_t> >(loc).widen(str_from[i]);
- }
- return result;
-
- //return boost::lexical_cast<std::wstring>(str_from);
- /*
- std::wstring str_trgt;
- if(!str_from.size())
- return str_trgt;
-
- int cb = ::MultiByteToWideChar( code_page, 0, str_from.data(), (int)str_from.size(), 0, 0 );
- if(!cb)
- return str_trgt;
-
- str_trgt.resize(cb);
- ::MultiByteToWideChar( code_page, 0, str_from.data(),(int)str_from.size(),
- (wchar_t*)str_trgt.data(),(int)str_trgt.size());
- return str_trgt;*/
- }
- inline std::wstring convert_to_unicode(const std::wstring& str_from)
- {
- return str_from;
- }
-
- template<class target_string>
- inline target_string convert_to_t(const std::wstring& str_from);
-
- template<>
- inline std::string convert_to_t<std::string>(const std::wstring& str_from)
- {
- return convert_to_ansii(str_from);
- }
-
- template<>
- inline std::wstring convert_to_t<std::wstring>(const std::wstring& str_from)
- {
- return str_from;
- }
-
- template<class target_string>
- inline target_string convert_to_t(const std::string& str_from);
-
- template<>
- inline std::string convert_to_t<std::string>(const std::string& str_from)
- {
- return str_from;
- }
-
- template<>
- inline std::wstring convert_to_t<std::wstring>(const std::string& str_from)
- {
- return convert_to_unicode(str_from);
- }
-
inline
std::string& base64_chars()
{