xtd - Reference Guide 0.2.0
convert_string.h
Go to the documentation of this file.
1 #pragma once
5 #include "static.h"
6 #include "ustring.h"
7 
9 namespace xtd {
21  public:
23 
35  static const std::string& to_string(const std::string& str) noexcept;
46  static std::string to_string(const char* str) noexcept;
57  static std::string to_string(char* str) noexcept;
68  static std::string to_string(const xtd::ustring& str) noexcept;
79  static std::string to_string(const std::u8string& str) noexcept;
90  static std::string to_string(const char8_t* str) noexcept;
101  static std::string to_string(char8_t* str) noexcept;
112  static std::string to_string(const std::u16string& str) noexcept;
123  static std::string to_string(const char16_t* str) noexcept;
134  static std::string to_string(char16_t* str) noexcept;
145  static std::string to_string(const std::u32string& str) noexcept;
156  static std::string to_string(const char32_t* str) noexcept;
167  static std::string to_string(char32_t* str) noexcept;
178  static std::string to_string(const std::wstring& str) noexcept;
189  static std::string to_string(const wchar_t* str) noexcept;
200  static std::string to_string(wchar_t* str) noexcept;
201 
212  static xtd::ustring to_ustring(const std::string& str) noexcept;
223  static xtd::ustring to_ustring(const char* str) noexcept;
234  static xtd::ustring to_ustring(char* str) noexcept;
245  static const xtd::ustring& to_ustring(const xtd::ustring& str) noexcept;
256  static xtd::ustring to_ustring(const std::u8string& str) noexcept;
267  static xtd::ustring to_ustring(const char8_t* str) noexcept;
278  static xtd::ustring to_ustring(char8_t* str) noexcept;
289  static xtd::ustring to_ustring(const std::u16string& str) noexcept;
300  static xtd::ustring to_ustring(const char16_t* str) noexcept;
310  static xtd::ustring to_ustring(char16_t* str) noexcept;
321  static xtd::ustring to_ustring(const std::u32string& str) noexcept;
331  static xtd::ustring to_ustring(const char32_t* str) noexcept;
341  static xtd::ustring to_ustring(char32_t* str) noexcept;
352  static xtd::ustring to_ustring(const std::wstring& str) noexcept;
362  static xtd::ustring to_ustring(const wchar_t* str) noexcept;
372  static xtd::ustring to_ustring(wchar_t* str) noexcept;
373 
384  static std::u8string to_u8string(const std::string& str) noexcept;
394  static std::u8string to_u8string(const char* str) noexcept;
404  static std::u8string to_u8string(char* str) noexcept;
415  static std::u8string to_u8string(const xtd::ustring& str) noexcept;
426  static const std::u8string& to_u8string(const std::u8string& str) noexcept;
436  static std::u8string to_u8string(const char8_t* str) noexcept;
442  static std::u8string to_u8string(char8_t* str) noexcept;
453  static std::u8string to_u8string(const std::u16string& str) noexcept;
463  static std::u8string to_u8string(const char16_t* str) noexcept;
473  static std::u8string to_u8string(char16_t* str) noexcept;
484  static std::u8string to_u8string(const std::u32string& str) noexcept;
494  static std::u8string to_u8string(const char32_t* str) noexcept;
504  static std::u8string to_u8string(char32_t* str) noexcept;
515  static std::u8string to_u8string(const std::wstring& str) noexcept;
525  static std::u8string to_u8string(const wchar_t* str) noexcept;
535  static std::u8string to_u8string(wchar_t* str) noexcept;
536 
547  static std::u16string to_u16string(const std::string& str) noexcept;
557  static std::u16string to_u16string(const char* str) noexcept;
567  static std::u16string to_u16string(char* str) noexcept;
578  static std::u16string to_u16string(const xtd::ustring& str) noexcept;
591  static std::u16string to_u16string(const std::u8string& str) noexcept;
601  static std::u16string to_u16string(const char8_t* str) noexcept;
611  static std::u16string to_u16string(char8_t* str) noexcept;
622  static const std::u16string& to_u16string(const std::u16string& str) noexcept;
632  static std::u16string to_u16string(const char16_t* str) noexcept;
642  static std::u16string to_u16string(char16_t* str) noexcept;
653  static std::u16string to_u16string(const std::u32string& str) noexcept;
663  static std::u16string to_u16string(const char32_t* str) noexcept;
673  static std::u16string to_u16string(char32_t* str) noexcept;
684  static std::u16string to_u16string(const std::wstring& str) noexcept;
694  static std::u16string to_u16string(const wchar_t* str) noexcept;
704  static std::u16string to_u16string(wchar_t* str) noexcept;
705 
716  static std::u32string to_u32string(const std::string& str) noexcept;
726  static std::u32string to_u32string(const char* str) noexcept;
736  static std::u32string to_u32string(char* str) noexcept;
747  static std::u32string to_u32string(const xtd::ustring& str) noexcept;
758  static std::u32string to_u32string(const std::u8string& str) noexcept;
768  static std::u32string to_u32string(const char8_t* str) noexcept;
778  static std::u32string to_u32string(char8_t* str) noexcept;
789  static std::u32string to_u32string(const std::u16string& str) noexcept;
799  static std::u32string to_u32string(const char16_t* str) noexcept;
809  static std::u32string to_u32string(char16_t* str) noexcept;
820  static const std::u32string& to_u32string(const std::u32string& str) noexcept;
830  static std::u32string to_u32string(const char32_t* str) noexcept;
840  static std::u32string to_u32string(char32_t* str) noexcept;
851  static std::u32string to_u32string(const std::wstring& str) noexcept;
861  static std::u32string to_u32string(const wchar_t* str) noexcept;
871  static std::u32string to_u32string(wchar_t* str) noexcept;
872 
883  static std::wstring to_wstring(const std::string& str) noexcept;
893  static std::wstring to_wstring(const char* str) noexcept;
903  static std::wstring to_wstring(char* str) noexcept;
914  static std::wstring to_wstring(const xtd::ustring& str) noexcept;
925  static std::wstring to_wstring(const std::u8string& str) noexcept;
935  static std::wstring to_wstring(const char8_t* str) noexcept;
945  static std::wstring to_wstring(char8_t* str) noexcept;
956  static std::wstring to_wstring(const std::u16string& str) noexcept;
966  static std::wstring to_wstring(const char16_t* str) noexcept;
976  static std::wstring to_wstring(char16_t* str) noexcept;
987  static std::wstring to_wstring(const std::u32string& str) noexcept;
997  static std::wstring to_wstring(const char32_t* str) noexcept;
1007  static std::wstring to_wstring(char32_t* str) noexcept;
1018  static const std::wstring& to_wstring(const std::wstring& str) noexcept;
1028  static std::wstring to_wstring(const wchar_t* str) noexcept;
1038  static std::wstring to_wstring(wchar_t* str) noexcept;
1040  };
1041 }
Contains xtd::static_object class.
static std::wstring to_wstring(const std::string &str) noexcept
Converts std::string to std::wstring.
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition: static.h:38
static const std::string & to_string(const std::string &str) noexcept
Converts std::string to std::string.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
static std::u32string to_u32string(const std::string &str) noexcept
Converts std::string to std::u32string.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:50
static std::u8string to_u8string(const std::string &str) noexcept
Converts std::string to std::u8string.
Represents API to convert string containers.
Definition: convert_string.h:20
static xtd::ustring to_ustring(const std::string &str) noexcept
Converts std::string to xtd::ustring.
Contains xtd::ustring class.
static std::u16string to_u16string(const std::string &str) noexcept
Converts std::string to std::u16string.