xtd 0.2.0
Loading...
Searching...
No Matches
convert_string.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "static.hpp"
6#include "string.hpp"
7#define __XTD_STD_INTERNAL__
9#undef __XTD_STD_INTERNAL__
10
12namespace xtd {
28 public:
30
42 [[nodiscard]] static auto to_string(const xtd::string& str) noexcept -> const xtd::string&;
53 [[nodiscard]] static auto to_string(const std::string& str) noexcept -> xtd::string;
64 [[nodiscard]] static auto to_string(const char* str) noexcept -> xtd::string;
75 [[nodiscard]] static auto to_string(char* str) noexcept -> xtd::string;
86 [[nodiscard]] static auto to_string(const xtd::u8string& str) noexcept -> xtd::string;
97 [[nodiscard]] static auto to_string(const std::u8string& str) noexcept -> xtd::string;
108 [[nodiscard]] static auto to_string(const char8* str) noexcept -> xtd::string;
119 [[nodiscard]] static auto to_string(char8* str) noexcept -> xtd::string;
130 [[nodiscard]] static auto to_string(const xtd::u16string& str) noexcept -> xtd::string;
141 [[nodiscard]] static auto to_string(const std::u16string& str) noexcept -> xtd::string;
152 [[nodiscard]] static auto to_string(const char16* str) noexcept -> xtd::string;
163 [[nodiscard]] static auto to_string(char16* str) noexcept -> xtd::string;
174 [[nodiscard]] static auto to_string(const xtd::u32string& str) noexcept -> xtd::string;
185 [[nodiscard]] static auto to_string(const std::u32string& str) noexcept -> xtd::string;
196 [[nodiscard]] static auto to_string(const char32* str) noexcept -> xtd::string;
207 [[nodiscard]] static auto to_string(char32* str) noexcept -> xtd::string;
218 [[nodiscard]] static auto to_string(const xtd::wstring& str) noexcept -> xtd::string;
229 [[nodiscard]] static auto to_string(const std::wstring& str) noexcept -> xtd::string;
240 [[nodiscard]] static auto to_string(const wchar* str) noexcept -> xtd::string;
251 [[nodiscard]] static auto to_string(wchar* str) noexcept -> xtd::string;
252
263 [[nodiscard]] static auto to_u8string(const xtd::string& str) noexcept -> xtd::u8string;
274 [[nodiscard]] static auto to_u8string(const std::string& str) noexcept -> xtd::u8string;
284 [[nodiscard]] static auto to_u8string(const char* str) noexcept -> xtd::u8string;
294 [[nodiscard]] static auto to_u8string(char* str) noexcept -> xtd::u8string;
305 [[nodiscard]] static auto to_u8string(const xtd::u8string& str) noexcept -> const xtd::u8string&;
316 [[nodiscard]] static auto to_u8string(const std::u8string& str) noexcept -> xtd::u8string;
326 [[nodiscard]] static auto to_u8string(const char8* str) noexcept -> xtd::u8string;
332 [[nodiscard]] static auto to_u8string(char8* str) noexcept -> xtd::u8string;
343 [[nodiscard]] static auto to_u8string(const xtd::u16string& str) noexcept -> xtd::u8string;
354 [[nodiscard]] static auto to_u8string(const std::u16string& str) noexcept -> xtd::u8string;
364 [[nodiscard]] static auto to_u8string(const char16* str) noexcept -> xtd::u8string;
374 [[nodiscard]] static auto to_u8string(char16* str) noexcept -> xtd::u8string;
385 [[nodiscard]] static auto to_u8string(const xtd::u32string& str) noexcept -> xtd::u8string;
396 [[nodiscard]] static auto to_u8string(const std::u32string& str) noexcept -> xtd::u8string;
406 [[nodiscard]] static auto to_u8string(const char32* str) noexcept -> xtd::u8string;
416 [[nodiscard]] static auto to_u8string(char32* str) noexcept -> xtd::u8string;
427 [[nodiscard]] static auto to_u8string(const xtd::wstring& str) noexcept -> xtd::u8string;
438 [[nodiscard]] static auto to_u8string(const std::wstring& str) noexcept -> xtd::u8string;
448 [[nodiscard]] static auto to_u8string(const wchar* str) noexcept -> xtd::u8string;
458 [[nodiscard]] static auto to_u8string(wchar* str) noexcept -> xtd::u8string;
459
470 [[nodiscard]] static auto to_u16string(const xtd::string& str) noexcept -> xtd::u16string;
481 [[nodiscard]] static auto to_u16string(const std::string& str) noexcept -> xtd::u16string;
491 [[nodiscard]] static auto to_u16string(const char* str) noexcept -> xtd::u16string;
501 [[nodiscard]] static auto to_u16string(char* str) noexcept -> xtd::u16string;
514 [[nodiscard]] static auto to_u16string(const xtd::u8string& str) noexcept -> xtd::u16string;
527 [[nodiscard]] static auto to_u16string(const std::u8string& str) noexcept -> xtd::u16string;
537 [[nodiscard]] static auto to_u16string(const char8* str) noexcept -> xtd::u16string;
547 [[nodiscard]] static auto to_u16string(char8* str) noexcept -> xtd::u16string;
558 [[nodiscard]] static auto to_u16string(const xtd::u16string& str) noexcept -> const xtd::u16string&;
569 [[nodiscard]] static auto to_u16string(const std::u16string& str) noexcept -> xtd::u16string;
579 [[nodiscard]] static auto to_u16string(const char16* str) noexcept -> xtd::u16string;
589 [[nodiscard]] static auto to_u16string(char16* str) noexcept -> xtd::u16string;
600 [[nodiscard]] static auto to_u16string(const xtd::u32string& str) noexcept -> xtd::u16string;
611 [[nodiscard]] static auto to_u16string(const std::u32string& str) noexcept -> xtd::u16string;
621 [[nodiscard]] static auto to_u16string(const char32* str) noexcept -> xtd::u16string;
631 [[nodiscard]] static auto to_u16string(char32* str) noexcept -> xtd::u16string;
642 [[nodiscard]] static auto to_u16string(const xtd::wstring& str) noexcept -> xtd::u16string;
653 [[nodiscard]] static auto to_u16string(const std::wstring& str) noexcept -> xtd::u16string;
663 [[nodiscard]] static auto to_u16string(const wchar* str) noexcept -> xtd::u16string;
673 [[nodiscard]] static auto to_u16string(wchar* str) noexcept -> xtd::u16string;
674
685 [[nodiscard]] static auto to_u32string(const xtd::string& str) noexcept -> xtd::u32string;
696 [[nodiscard]] static auto to_u32string(const std::string& str) noexcept -> xtd::u32string;
706 [[nodiscard]] static auto to_u32string(const char* str) noexcept -> xtd::u32string;
716 [[nodiscard]] static auto to_u32string(char* str) noexcept -> xtd::u32string;
727 [[nodiscard]] static auto to_u32string(const xtd::u8string& str) noexcept -> xtd::u32string;
738 [[nodiscard]] static auto to_u32string(const std::u8string& str) noexcept -> xtd::u32string;
748 [[nodiscard]] static auto to_u32string(const char8* str) noexcept -> xtd::u32string;
758 [[nodiscard]] static auto to_u32string(char8* str) noexcept -> xtd::u32string;
769 [[nodiscard]] static auto to_u32string(const xtd::u16string& str) noexcept -> xtd::u32string;
780 [[nodiscard]] static auto to_u32string(const std::u16string& str) noexcept -> xtd::u32string;
790 [[nodiscard]] static auto to_u32string(const char16* str) noexcept -> xtd::u32string;
800 [[nodiscard]] static auto to_u32string(char16* str) noexcept -> xtd::u32string;
811 [[nodiscard]] static auto to_u32string(const xtd::u32string& str) noexcept -> const xtd::u32string&;
822 [[nodiscard]] static auto to_u32string(const std::u32string& str) noexcept -> xtd::u32string;
832 [[nodiscard]] static auto to_u32string(const char32* str) noexcept -> xtd::u32string;
842 [[nodiscard]] static auto to_u32string(char32* str) noexcept -> xtd::u32string;
853 [[nodiscard]] static auto to_u32string(const xtd::wstring& str) noexcept -> xtd::u32string;
864 [[nodiscard]] static auto to_u32string(const std::wstring& str) noexcept -> xtd::u32string;
874 [[nodiscard]] static auto to_u32string(const wchar* str) noexcept -> xtd::u32string;
884 [[nodiscard]] static auto to_u32string(wchar* str) noexcept -> xtd::u32string;
885
896 [[nodiscard]] static auto to_wstring(const xtd::string& str) noexcept -> xtd::wstring;
907 [[nodiscard]] static auto to_wstring(const std::string& str) noexcept -> xtd::wstring;
917 [[nodiscard]] static auto to_wstring(const char* str) noexcept -> xtd::wstring;
927 [[nodiscard]] static auto to_wstring(char* str) noexcept -> xtd::wstring;
938 [[nodiscard]] static auto to_wstring(const xtd::u8string& str) noexcept -> xtd::wstring;
949 [[nodiscard]] static auto to_wstring(const std::u8string& str) noexcept -> xtd::wstring;
959 [[nodiscard]] static auto to_wstring(const char8* str) noexcept -> xtd::wstring;
969 [[nodiscard]] static auto to_wstring(char8* str) noexcept -> xtd::wstring;
980 [[nodiscard]] static auto to_wstring(const xtd::u16string& str) noexcept -> xtd::wstring;
991 [[nodiscard]] static auto to_wstring(const std::u16string& str) noexcept -> xtd::wstring;
1001 [[nodiscard]] static auto to_wstring(const char16* str) noexcept -> xtd::wstring;
1011 [[nodiscard]] static auto to_wstring(char16* str) noexcept -> xtd::wstring;
1022 [[nodiscard]] static auto to_wstring(const xtd::u32string& str) noexcept -> xtd::wstring;
1033 [[nodiscard]] static auto to_wstring(const std::u32string& str) noexcept -> xtd::wstring;
1043 [[nodiscard]] static auto to_wstring(const char32* str) noexcept -> xtd::wstring;
1053 [[nodiscard]] static auto to_wstring(char32* str) noexcept -> xtd::wstring;
1064 [[nodiscard]] static auto to_wstring(const xtd::wstring& str) noexcept -> const xtd::wstring&;
1075 [[nodiscard]] static auto to_wstring(const std::wstring& str) noexcept -> xtd::wstring;
1085 [[nodiscard]] static auto to_wstring(const wchar* str) noexcept -> xtd::wstring;
1095 [[nodiscard]] static auto to_wstring(wchar* str) noexcept -> xtd::wstring;
1097
1099
1107 template<typename string_t>
1108 [[deprecated("Replaced by xtd::convert_string::to_string - Will be removed in version 0.4.0.")]] [[nodiscard]] static auto to_ustring(const string_t& str) noexcept -> const xtd::string& {return to_string(str);}
1115 template<typename char_t>
1116 [[deprecated("Replaced by xtd::convert_string::to_string - Will be removed in version 0.4.0.")]] [[nodiscard]] static auto to_ustring(const char_t* str) noexcept -> const xtd::string& {return to_string(str);}
1123 template<typename char_t>
1124 [[deprecated("Replaced by xtd::convert_string::to_string - Will be removed in version 0.4.0.")]] [[nodiscard]] static auto to_ustring(char_t* str) noexcept -> const xtd::string& {return to_string(str);}
1126 };
1127}
Represents API to convert string containers.
Definition convert_string.hpp:27
static auto to_u16string(const xtd::u32string &str) noexcept -> xtd::u16string
Converts std::u32string to xtd::u16string.
static auto to_string(const std::string &str) noexcept -> xtd::string
Converts std::string to xtd::string.
static auto to_u32string(const xtd::u8string &str) noexcept -> xtd::u32string
Converts std::u8string to xtd::u32string.
static auto to_u8string(const char8 *str) noexcept -> xtd::u8string
Converts const char8* to xtd::u8string.
static auto to_u32string(wchar *str) noexcept -> xtd::u32string
Converts wchar* to xtd::u32string.
static auto to_u16string(const char8 *str) noexcept -> xtd::u16string
Converts const char8* to xtd::u16string.
static auto to_wstring(const xtd::string &str) noexcept -> xtd::wstring
Converts xtd::string to xtd::wstring.
static auto to_u8string(const std::u16string &str) noexcept -> xtd::u8string
Converts std::u16string to xtd::u8string.
static auto to_string(const char *str) noexcept -> xtd::string
Converts const char* to xtd::string.
static auto to_u16string(const std::wstring &str) noexcept -> xtd::u16string
Converts std::wstring to xtd::u16string.
static auto to_wstring(const char8 *str) noexcept -> xtd::wstring
Converts const char8* to xtd::wstring.
static auto to_u32string(char16 *str) noexcept -> xtd::u32string
Converts char16* to xtd::u32string.
static auto to_u32string(const char32 *str) noexcept -> xtd::u32string
Converts const char32* to xtd::u32string.
static auto to_wstring(const std::u16string &str) noexcept -> xtd::wstring
Converts std::u16string to xtd::wstring.
static auto to_wstring(char16 *str) noexcept -> xtd::wstring
Converts char16* to xtd::wstring.
static auto to_u8string(char16 *str) noexcept -> xtd::u8string
Converts char16* to xtd::u8string.
static auto to_u16string(const xtd::u8string &str) noexcept -> xtd::u16string
Converts std::u8string to xtd::u16string.
static auto to_u16string(char32 *str) noexcept -> xtd::u16string
Converts char32* to xtd::u16string.
static auto to_u16string(wchar *str) noexcept -> xtd::u16string
Converts wchar* to xtd::u16string.
static auto to_string(const std::wstring &str) noexcept -> xtd::string
Converts std::wstring to xtd::string.
static auto to_string(const std::u8string &str) noexcept -> xtd::string
Converts std::u8string to xtd::string.
static auto to_u32string(char *str) noexcept -> xtd::u32string
Converts char* to xtd::u32string.
static auto to_string(const std::u16string &str) noexcept -> xtd::string
Converts std::u16string to xtd::string.
static auto to_u32string(const xtd::string &str) noexcept -> xtd::u32string
Converts xtd::string to xtd::u32string.
static auto to_u16string(const std::string &str) noexcept -> xtd::u16string
Converts std::string to xtd::u16string.
static auto to_u8string(char32 *str) noexcept -> xtd::u8string
Converts char32* to xtd::u8string.
static auto to_u16string(const char *str) noexcept -> xtd::u16string
Converts const char* to xtd::u16string.
static auto to_ustring(char_t *str) noexcept -> const xtd::string &
Converts string_t to xtd::string.
Definition convert_string.hpp:1124
static auto to_u16string(const std::u32string &str) noexcept -> xtd::u16string
Converts std::u32string to xtd::u16string.
static auto to_u32string(const xtd::wstring &str) noexcept -> xtd::u32string
Converts std::wstring to xtd::u32string.
static auto to_string(const char8 *str) noexcept -> xtd::string
Converts const char8* to xtd::string.
static auto to_u32string(char32 *str) noexcept -> xtd::u32string
Converts char32* to xtd::u32string.
static auto to_wstring(char *str) noexcept -> xtd::wstring
Converts char* to xtd::wstring.
static auto to_string(const std::u32string &str) noexcept -> xtd::string
Converts std::u32string to xtd::string.
static auto to_wstring(const char *str) noexcept -> xtd::wstring
Converts const char* to xtd::wstring.
static auto to_string(wchar *str) noexcept -> xtd::string
Converts wchar* to xtd::string.
static auto to_u8string(const xtd::string &str) noexcept -> xtd::u8string
Converts xtd::string to xtd::u8string.
static auto to_wstring(const xtd::wstring &str) noexcept -> const xtd::wstring &
Converts std::wstring to xtd::wstring.
static auto to_u32string(const std::wstring &str) noexcept -> xtd::u32string
Converts std::wstring to xtd::u32string.
static auto to_string(char *str) noexcept -> xtd::string
Converts char* to xtd::string.
static auto to_u32string(char8 *str) noexcept -> xtd::u32string
Converts char8* to xtd::u32string.
static auto to_string(char32 *str) noexcept -> xtd::string
Converts char32* to xtd::string.
static auto to_u32string(const std::string &str) noexcept -> xtd::u32string
Converts std::string to xtd::u32string.
static auto to_wstring(const xtd::u32string &str) noexcept -> xtd::wstring
Converts std::u32string to xtd::wstring.
static auto to_u8string(wchar *str) noexcept -> xtd::u8string
Converts wchar* to xtd::u8string.
static auto to_u16string(const std::u8string &str) noexcept -> xtd::u16string
Converts std::u8string to xtd::u16string.
static auto to_u16string(const char32 *str) noexcept -> xtd::u16string
Converts const char32* to xtd::u16string.
static auto to_string(char16 *str) noexcept -> xtd::string
Converts char16* to xtd::string.
static auto to_u32string(const std::u16string &str) noexcept -> xtd::u32string
Converts std::u16string to xtd::u32string.
static auto to_u16string(const xtd::string &str) noexcept -> xtd::u16string
Converts xtd::string to xtd::u16string.
static auto to_u8string(const char *str) noexcept -> xtd::u8string
Converts const char* to xtd::u8string.
static auto to_u32string(const std::u32string &str) noexcept -> xtd::u32string
Converts std::u32string to xtd::u32string.
static auto to_wstring(const char32 *str) noexcept -> xtd::wstring
Converts const char32* to xtd::wstring.
static auto to_string(char8 *str) noexcept -> xtd::string
Converts char8* to xtd::string.
static auto to_string(const xtd::u8string &str) noexcept -> xtd::string
Converts xtd::u8string to xtd::string.
static auto to_u8string(const xtd::wstring &str) noexcept -> xtd::u8string
Converts std::wstring to xtd::u8string.
static auto to_wstring(const xtd::u8string &str) noexcept -> xtd::wstring
Converts std::u8string to xtd::wstring.
static auto to_wstring(const std::u8string &str) noexcept -> xtd::wstring
Converts std::u8string to xtd::wstring.
static auto to_u32string(const char *str) noexcept -> xtd::u32string
Converts const char* to xtd::u32string.
static auto to_u16string(const std::u16string &str) noexcept -> xtd::u16string
Converts std::u16string to xtd::u16string.
static auto to_string(const xtd::u16string &str) noexcept -> xtd::string
Converts xtd::u16string to xtd::string.
static auto to_u32string(const wchar *str) noexcept -> xtd::u32string
Converts const wchar* to xtd::u32string.
static auto to_u8string(const std::u8string &str) noexcept -> xtd::u8string
Converts std::u8string to xtd::u8string.
static auto to_wstring(wchar *str) noexcept -> xtd::wstring
Converts wchar* to xtd::wstring.
static auto to_u16string(char8 *str) noexcept -> xtd::u16string
Converts char8* to xtd::u16string.
static auto to_u16string(const xtd::u16string &str) noexcept -> const xtd::u16string &
Converts std::u16string to xtd::u16string.
static auto to_u8string(const std::u32string &str) noexcept -> xtd::u8string
Converts std::u32string to xtd::u8string.
static auto to_wstring(const std::wstring &str) noexcept -> xtd::wstring
Converts std::wstring to xtd::wstring.
static auto to_wstring(char8 *str) noexcept -> xtd::wstring
Converts char8* to xtd::wstring.
static auto to_ustring(const char_t *str) noexcept -> const xtd::string &
Converts string_t to xtd::string.
Definition convert_string.hpp:1116
static auto to_u32string(const char16 *str) noexcept -> xtd::u32string
Converts const char16* to xtd::u32string.
static auto to_u16string(char16 *str) noexcept -> xtd::u16string
Converts char16* to xtd::u16string.
static auto to_wstring(const xtd::u16string &str) noexcept -> xtd::wstring
Converts std::u16string to xtd::wstring.
static auto to_u32string(const std::u8string &str) noexcept -> xtd::u32string
Converts std::u8string to xtd::u32string.
static auto to_u8string(char *str) noexcept -> xtd::u8string
Converts char* to xtd::u8string.
static auto to_string(const char32 *str) noexcept -> xtd::string
Converts const char32* to xtd::string.
static auto to_u8string(const xtd::u16string &str) noexcept -> xtd::u8string
Converts std::u16string to xtd::u8string.
static auto to_u32string(const xtd::u32string &str) noexcept -> const xtd::u32string &
Converts std::u32string to xtd::u32string.
static auto to_string(const xtd::wstring &str) noexcept -> xtd::string
Converts xtd::wstring to xtd::string.
static auto to_ustring(const string_t &str) noexcept -> const xtd::string &
Converts string_t to xtd::string.
Definition convert_string.hpp:1108
static auto to_u32string(const char8 *str) noexcept -> xtd::u32string
Converts const char8* to xtd::u32string.
static auto to_u32string(const xtd::u16string &str) noexcept -> xtd::u32string
Converts std::u16string to xtd::u32string.
static auto to_string(const xtd::u32string &str) noexcept -> xtd::string
Converts xtd::u32string to xtd::string.
static auto to_u16string(char *str) noexcept -> xtd::u16string
Converts char* to xtd::u16string.
static auto to_u8string(const xtd::u32string &str) noexcept -> xtd::u8string
Converts std::u32string to xtd::u8string.
static auto to_wstring(const std::string &str) noexcept -> xtd::wstring
Converts std::string to xtd::wstring.
static auto to_u16string(const xtd::wstring &str) noexcept -> xtd::u16string
Converts std::wstring to xtd::u16string.
static auto to_u8string(const std::string &str) noexcept -> xtd::u8string
Converts std::string to xtd::u8string.
static auto to_u8string(const xtd::u8string &str) noexcept -> const xtd::u8string &
Converts std::u8string to xtd::u8string.
static auto to_u8string(const char16 *str) noexcept -> xtd::u8string
Converts const char16* to xtd::u8string.
static auto to_u16string(const char16 *str) noexcept -> xtd::u16string
Converts const char16* to xtd::u16string.
static auto to_string(const wchar *str) noexcept -> xtd::string
Converts const wchar* to xtd::string.
static auto to_u8string(char8 *str) noexcept -> xtd::u8string
Converts char8* to xtd::u8string.
static auto to_string(const char16 *str) noexcept -> xtd::string
Converts const char16* to xtd::string.
static auto to_u8string(const wchar *str) noexcept -> xtd::u8string
Converts const wchar* to xtd::u8string.
static auto to_wstring(const wchar *str) noexcept -> xtd::wstring
Converts const wchar* to xtd::wstring.
static auto to_u8string(const std::wstring &str) noexcept -> xtd::u8string
Converts std::wstring to xtd::u8string.
static auto to_wstring(const std::u32string &str) noexcept -> xtd::wstring
Converts std::u32string to xtd::wstring.
static auto to_wstring(char32 *str) noexcept -> xtd::wstring
Converts char32* to xtd::wstring.
static auto to_string(const xtd::string &str) noexcept -> const xtd::string &
Converts xtd::string to xtd::string.
static auto to_u8string(const char32 *str) noexcept -> xtd::u8string
Converts const char32* to xtd::u8string.
static auto to_wstring(const char16 *str) noexcept -> xtd::wstring
Converts const char16* to xtd::wstring.
static auto to_u16string(const wchar *str) noexcept -> xtd::u16string
Converts const wchar* to xtd::u16string.
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:38
xtd::basic_string< xtd::char8 > u8string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:76
xtd::basic_string< xtd::char32 > u32string
Represents text as a sequence of UTF-32 code units.
Definition __string_definitions.hpp:65
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
xtd::basic_string< xtd::char16 > u16string
Represents text as a sequence of UTF-16 code units.
Definition __string_definitions.hpp:54
xtd::basic_string< xtd::wchar > wstring
Represents text as a sequence of UTF-16 code unit on Windows or UTF-32 code unit on non-Windows syste...
Definition __string_definitions.hpp:87
char8_t char8
Represents a 8-bit unicode character.
Definition char8.hpp:26
wchar_t wchar
Represents a wide character.
Definition wchar.hpp:24
char16_t char16
Represents a 16-bit unicode character.
Definition char16.hpp:26
char32_t char32
Represents a 32-bit unicode character.
Definition char32.hpp:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
string to_string() const noexcept override
Returns the string representation of this xtd::read_only_span <type_t> object.
Definition read_only_span.hpp:375
Contains xtd::static_object class.
Contains xtd::string alias.