xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
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:
32  static const std::string& to_string(const std::string& str) noexcept;
43  static std::string to_string(const char* str) noexcept;
54  static std::string to_string(char* str) noexcept;
65  static std::string to_string(const xtd::ustring& str) noexcept;
76  static std::string to_string(const std::u8string& str) noexcept;
87  static std::string to_string(const char8_t* str) noexcept;
98  static std::string to_string(char8_t* str) noexcept;
109  static std::string to_string(const std::u16string& str) noexcept;
120  static std::string to_string(const char16_t* str) noexcept;
131  static std::string to_string(char16_t* str) noexcept;
142  static std::string to_string(const std::u32string& str) noexcept;
153  static std::string to_string(const char32_t* str) noexcept;
164  static std::string to_string(char32_t* str) noexcept;
175  static std::string to_string(const std::wstring& str) noexcept;
186  static std::string to_string(const wchar_t* str) noexcept;
197  static std::string to_string(wchar_t* str) noexcept;
198 
209  static xtd::ustring to_ustring(const std::string& str) noexcept;
220  static xtd::ustring to_ustring(const char* str) noexcept;
231  static xtd::ustring to_ustring(char* str) noexcept;
242  static const xtd::ustring& to_ustring(const xtd::ustring& str) noexcept;
253  static xtd::ustring to_ustring(const std::u8string& str) noexcept;
264  static xtd::ustring to_ustring(const char8_t* str) noexcept;
275  static xtd::ustring to_ustring(char8_t* str) noexcept;
286  static xtd::ustring to_ustring(const std::u16string& str) noexcept;
297  static xtd::ustring to_ustring(const char16_t* str) noexcept;
307  static xtd::ustring to_ustring(char16_t* str) noexcept;
318  static xtd::ustring to_ustring(const std::u32string& str) noexcept;
328  static xtd::ustring to_ustring(const char32_t* str) noexcept;
338  static xtd::ustring to_ustring(char32_t* str) noexcept;
349  static xtd::ustring to_ustring(const std::wstring& str) noexcept;
359  static xtd::ustring to_ustring(const wchar_t* str) noexcept;
369  static xtd::ustring to_ustring(wchar_t* str) noexcept;
370 
381  static std::u8string to_u8string(const std::string& str) noexcept;
391  static std::u8string to_u8string(const char* str) noexcept;
401  static std::u8string to_u8string(char* str) noexcept;
412  static std::u8string to_u8string(const xtd::ustring& str) noexcept;
423  static const std::u8string& to_u8string(const std::u8string& str) noexcept;
433  static std::u8string to_u8string(const char8_t* str) noexcept;
439  static std::u8string to_u8string(char8_t* str) noexcept;
450  static std::u8string to_u8string(const std::u16string& str) noexcept;
460  static std::u8string to_u8string(const char16_t* str) noexcept;
470  static std::u8string to_u8string(char16_t* str) noexcept;
481  static std::u8string to_u8string(const std::u32string& str) noexcept;
491  static std::u8string to_u8string(const char32_t* str) noexcept;
501  static std::u8string to_u8string(char32_t* str) noexcept;
512  static std::u8string to_u8string(const std::wstring& str) noexcept;
522  static std::u8string to_u8string(const wchar_t* str) noexcept;
532  static std::u8string to_u8string(wchar_t* str) noexcept;
533 
544  static std::u16string to_u16string(const std::string& str) noexcept;
554  static std::u16string to_u16string(const char* str) noexcept;
564  static std::u16string to_u16string(char* str) noexcept;
575  static std::u16string to_u16string(const xtd::ustring& str) noexcept;
588  static std::u16string to_u16string(const std::u8string& str) noexcept;
598  static std::u16string to_u16string(const char8_t* str) noexcept;
608  static std::u16string to_u16string(char8_t* str) noexcept;
619  static const std::u16string& to_u16string(const std::u16string& str) noexcept;
629  static std::u16string to_u16string(const char16_t* str) noexcept;
639  static std::u16string to_u16string(char16_t* str) noexcept;
650  static std::u16string to_u16string(const std::u32string& str) noexcept;
660  static std::u16string to_u16string(const char32_t* str) noexcept;
670  static std::u16string to_u16string(char32_t* str) noexcept;
681  static std::u16string to_u16string(const std::wstring& str) noexcept;
691  static std::u16string to_u16string(const wchar_t* str) noexcept;
701  static std::u16string to_u16string(wchar_t* str) noexcept;
702 
713  static std::u32string to_u32string(const std::string& str) noexcept;
723  static std::u32string to_u32string(const char* str) noexcept;
733  static std::u32string to_u32string(char* str) noexcept;
744  static std::u32string to_u32string(const xtd::ustring& str) noexcept;
755  static std::u32string to_u32string(const std::u8string& str) noexcept;
765  static std::u32string to_u32string(const char8_t* str) noexcept;
775  static std::u32string to_u32string(char8_t* str) noexcept;
786  static std::u32string to_u32string(const std::u16string& str) noexcept;
796  static std::u32string to_u32string(const char16_t* str) noexcept;
806  static std::u32string to_u32string(char16_t* str) noexcept;
817  static const std::u32string& to_u32string(const std::u32string& str) noexcept;
827  static std::u32string to_u32string(const char32_t* str) noexcept;
837  static std::u32string to_u32string(char32_t* str) noexcept;
848  static std::u32string to_u32string(const std::wstring& str) noexcept;
858  static std::u32string to_u32string(const wchar_t* str) noexcept;
868  static std::u32string to_u32string(wchar_t* str) noexcept;
869 
880  static std::wstring to_wstring(const std::string& str) noexcept;
890  static std::wstring to_wstring(const char* str) noexcept;
900  static std::wstring to_wstring(char* str) noexcept;
911  static std::wstring to_wstring(const xtd::ustring& str) noexcept;
922  static std::wstring to_wstring(const std::u8string& str) noexcept;
932  static std::wstring to_wstring(const char8_t* str) noexcept;
942  static std::wstring to_wstring(char8_t* str) noexcept;
953  static std::wstring to_wstring(const std::u16string& str) noexcept;
963  static std::wstring to_wstring(const char16_t* str) noexcept;
973  static std::wstring to_wstring(char16_t* str) noexcept;
984  static std::wstring to_wstring(const std::u32string& str) noexcept;
994  static std::wstring to_wstring(const char32_t* str) noexcept;
1004  static std::wstring to_wstring(char32_t* str) noexcept;
1015  static const std::wstring& to_wstring(const std::wstring& str) noexcept;
1025  static std::wstring to_wstring(const wchar_t* str) noexcept;
1035  static std::wstring to_wstring(wchar_t* str) noexcept;
1036  };
1037 }
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:48
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.