xtd 0.2.0
convert.h
Go to the documentation of this file.
1 #pragma once
5 #include "any.h"
6 #include "argument_exception.h"
7 #include "format_exception.h"
9 #include "overflow_exception.h"
10 #include "static.h"
11 #include "types.h"
12 #include "ustring.h"
13 
15 namespace xtd {
25  class convert static_ {
26  public:
28 
38  static std::any to_any(std::any value) noexcept;
47  static std::any to_any(bool value) noexcept;
56  static std::any to_any(xtd::byte value) noexcept;
65  static std::any to_any(char value) noexcept;
66 #if defined(__cpp_lib_char8_t)
67  static std::any to_any(char8 value);
77 #endif
78  static std::any to_any(char16 value) noexcept;
95  static std::any to_any(char32 value) noexcept;
104  static std::any to_any(wchar value) noexcept;
113  static std::any to_any(decimal value) noexcept;
122  static std::any to_any(double value) noexcept;
134  static std::any to_any(float value) noexcept;
143  static std::any to_any(int16 value) noexcept;
152  static std::any to_any(int32 value) noexcept;
161  static std::any to_any(int64 value) noexcept;
170  static std::any to_any(slong value) noexcept;
179  static std::any to_any(sbyte value) noexcept;
188  static std::any to_any(uint16 value) noexcept;
197  static std::any to_any(uint32 value) noexcept;
206  static std::any to_any(uint64 value) noexcept;
215  static std::any to_any(xtd::ulong value) noexcept;
224  static std::any to_any(const xtd::ustring& value) noexcept;
226  static std::any to_any(const std::string& value) noexcept;
227 #if defined(__cpp_lib_char8_t)
228  static std::any to_any(const std::u8string& value) noexcept;
229 #endif
230  static std::any to_any(const std::u16string& value) noexcept;
231  static std::any to_any(const std::u32string& value) noexcept;
232  static std::any to_any(const std::wstring& value) noexcept;
233  static std::any to_any(const char* value) noexcept;
234  static std::any to_any(char* value) noexcept;
235 #if defined(__cpp_lib_char8_t)
236  static std::any to_any(const char8* value);
237  static std::any to_any(char8* value);
238 #endif
239  static std::any to_any(const char16* value) noexcept;
240  static std::any to_any(char16* value) noexcept;
241  static std::any to_any(const char32* value) noexcept;
242  static std::any to_any(char32* value) noexcept;
243  static std::any to_any(const wchar* value) noexcept;
244  static std::any to_any(wchar* value) noexcept;
254  template<typename type_t>
255  static std::any to_any(type_t value) {
256  try {
257  return std::any(value);
258  } catch (...) {
260  }
261  }
262 
272  static bool to_boolean(std::any value);
281  static bool to_boolean(bool value) noexcept;
290  static bool to_boolean(xtd::byte value) noexcept;
300  static bool to_boolean(char value);
301 #if defined(__cpp_lib_char8_t)
302  static bool to_boolean(char8 value);
312 #endif
313  static bool to_boolean(char16 value);
332  static bool to_boolean(char32 value);
342  static bool to_boolean(wchar value);
351  static bool to_boolean(decimal value) noexcept;
360  static bool to_boolean(double value) noexcept;
372  static bool to_boolean(float value) noexcept;
381  static bool to_boolean(int16 value) noexcept;
390  static bool to_boolean(int32 value) noexcept;
399  static bool to_boolean(int64 value) noexcept;
408  static bool to_boolean(slong value) noexcept;
417  static bool to_boolean(sbyte value) noexcept;
426  static bool to_boolean(uint16 value) noexcept;
435  static bool to_boolean(uint32 value) noexcept;
444  static bool to_boolean(uint64 value) noexcept;
453  static bool to_boolean(xtd::ulong value) noexcept;
463  static bool to_boolean(const xtd::ustring& value);
465  static bool to_boolean(const std::string& value);
466 #if defined(__cpp_lib_char8_t)
467  static bool to_boolean(const std::u8string& value);
468 #endif
469  static bool to_boolean(const std::u16string& value);
470  static bool to_boolean(const std::u32string& value);
471  static bool to_boolean(const std::wstring& value);
472  static bool to_boolean(const char* value);
473  static bool to_boolean(char* value);
474 #if defined(__cpp_lib_char8_t)
475  static bool to_boolean(const char8* value);
476  static bool to_boolean(char8* value);
477 #endif
478  static bool to_boolean(const char16* value);
479  static bool to_boolean(char16* value);
480  static bool to_boolean(const char32* value);
481  static bool to_boolean(char32* value);
482  static bool to_boolean(const wchar* value);
483  static bool to_boolean(wchar* value);
493  template<typename type_t>
494  static bool to_boolean(type_t value) noexcept {
495  return static_cast<bool>(value);
496  }
497 
506  static xtd::byte to_byte(std::any value);
515  static xtd::byte to_byte(bool value) noexcept;
524  static xtd::byte to_byte(xtd::byte value) noexcept;
533  static xtd::byte to_byte(char value) noexcept;
534 #if defined(__cpp_lib_char8_t)
535  static xtd::byte to_byte(char8 value) noexcept;
544 #endif
545  static xtd::byte to_byte(char16 value);
564  static xtd::byte to_byte(char32 value);
574  static xtd::byte to_byte(wchar value);
585  static xtd::byte to_byte(decimal value);
596  static xtd::byte to_byte(double value);
607  static xtd::byte to_byte(float value);
617  static xtd::byte to_byte(int16 value);
627  static xtd::byte to_byte(int32 value);
637  static xtd::byte to_byte(int64 value);
647  static xtd::byte to_byte(slong value);
657  static xtd::byte to_byte(sbyte value);
667  static xtd::byte to_byte(uint16 value);
677  static xtd::byte to_byte(uint32 value);
687  static xtd::byte to_byte(uint64 value);
697  static xtd::byte to_byte(xtd::ulong value);
707  static xtd::byte to_byte(const xtd::ustring& value);
718  static xtd::byte to_byte(const xtd::ustring& value, xtd::byte from_base);
720  static xtd::byte to_byte(const std::string& value);
721 #if defined(__cpp_lib_char8_t)
722  static xtd::byte to_byte(const std::u8string& value);
723 #endif
724  static xtd::byte to_byte(const std::u16string& value);
725  static xtd::byte to_byte(const std::u32string& value);
726  static xtd::byte to_byte(const std::wstring& value);
727  static xtd::byte to_byte(const char* value);
728  static xtd::byte to_byte(char* value);
729 #if defined(__cpp_lib_char8_t)
730  static xtd::byte to_byte(const char8* value);
731  static xtd::byte to_byte(char8* value);
732 #endif
733  static xtd::byte to_byte(const char16* value);
734  static xtd::byte to_byte(char16* value);
735  static xtd::byte to_byte(const char32* value);
736  static xtd::byte to_byte(char32* value);
737  static xtd::byte to_byte(const wchar* value);
738  static xtd::byte to_byte(wchar* value);
748  template<typename type_t>
749  static xtd::byte to_byte(type_t value) noexcept {
750  return static_cast<xtd::byte>(value);
751  }
752 
761  static char to_char(std::any value);
770  static char to_char(bool value);
779  static char to_char(xtd::byte value) noexcept;
788  static char to_char(char value) noexcept;
789 #if defined(__cpp_lib_char8_t)
790  static char to_char(char8 value) noexcept;
799 #endif
800  static char to_char(char16 value);
819  static char to_char(char32 value);
829  static char to_char(wchar value);
839  static char to_char(decimal value);
850  static char to_char(double value);
861  static char to_char(float value);
871  static char to_char(int16 value);
881  static char to_char(int32 value);
891  static char to_char(int64 value);
901  static char to_char(slong value);
911  static char to_char(sbyte value);
921  static char to_char(uint16 value);
931  static char to_char(uint32 value);
941  static char to_char(uint64 value);
951  static char to_char(xtd::ulong value);
961  static char to_char(const xtd::ustring& value);
963  static char to_char(const std::string& value);
964 #if defined(__cpp_lib_char8_t)
965  static char to_char(const std::u8string& value);
966 #endif
967  static char to_char(const std::u16string& value);
968  static char to_char(const std::u32string& value);
969  static char to_char(const std::wstring& value);
970  static char to_char(const char* value);
971  static char to_char(char* value);
972 #if defined(__cpp_lib_char8_t)
973  static char to_char(const char8* value);
974  static char to_char(char8* value);
975 #endif
976  static char to_char(const char16* value);
977  static char to_char(char16* value);
978  static char to_char(const char32* value);
979  static char to_char(char32* value);
980  static char to_char(const wchar* value);
981  static char to_char(wchar* value);
991  template<typename type_t>
992  static char to_char(type_t value) noexcept {
993  return static_cast<char>(value);
994  }
995 
996 #if defined(__cpp_lib_char8_t)
997  static char8 to_char8(std::any value);
1014  static char8 to_char8(bool value);
1023  static char8 to_char8(xtd::byte value) noexcept;
1032  static char8 to_char8(char value) noexcept;
1041  static char8 to_char8(char8 value) noexcept;
1051  static char8 to_char8(char16 value);
1061  static char8 to_char8(char32 value);
1071  static char8 to_char8(wchar value);
1081  static char8 to_char8(decimal value);
1092  static char8 to_char8(double value);
1103  static char8 to_char8(float value);
1113  static char8 to_char8(int16 value);
1123  static char8 to_char8(int32 value);
1133  static char8 to_char8(int64 value);
1143  static char8 to_char8(slong value);
1153  static char8 to_char8(sbyte value);
1163  static char8 to_char8(uint16 value);
1173  static char8 to_char8(uint32 value);
1183  static char8 to_char8(uint64 value);
1193  static char8 to_char8(xtd::ulong value);
1203  static char8 to_char8(const xtd::ustring& value);
1205  static char8 to_char8(const std::string& value);
1206  static char8 to_char8(const std::u8string& value);
1207  static char8 to_char8(const std::u16string& value);
1208  static char8 to_char8(const std::u32string& value);
1209  static char8 to_char8(const std::wstring& value);
1210  static char8 to_char8(const char* value);
1211  static char8 to_char8(char* value);
1212  static char8 to_char8(const char8* value);
1213  static char8 to_char8(char8* value);
1214  static char8 to_char8(const char16* value);
1215  static char8 to_char8(char16* value);
1216  static char8 to_char8(const char32* value);
1217  static char8 to_char8(char32* value);
1218  static char8 to_char8(const wchar* value);
1219  static char8 to_char8(wchar* value);
1229  template<typename type_t>
1230  static char8 to_char8(type_t value) noexcept {
1231  return static_cast<char8>(value);
1232  }
1233 #endif
1234 
1243  static char16 to_char16(std::any value);
1252  static char16 to_char16(bool value);
1261  static char16 to_char16(xtd::byte value) noexcept;
1270  static char16 to_char16(char value) noexcept;
1271 #if defined(__cpp_lib_char8_t)
1272  static char16 to_char16(char8 value) noexcept;
1281 #endif
1282  static char16 to_char16(char16 value) noexcept;
1300  static char16 to_char16(char32 value);
1309  static char16 to_char16(wchar value) noexcept;
1319  static char16 to_char16(decimal value);
1330  static char16 to_char16(double value);
1341  static char16 to_char16(float value);
1351  static char16 to_char16(int16 value);
1361  static char16 to_char16(int32 value);
1371  static char16 to_char16(int64 value);
1381  static char16 to_char16(slong value);
1391  static char16 to_char16(sbyte value);
1400  static char16 to_char16(uint16 value) noexcept;
1410  static char16 to_char16(uint32 value);
1420  static char16 to_char16(uint64 value);
1430  static char16 to_char16(xtd::ulong value);
1440  static char16 to_char16(const xtd::ustring& value);
1442  static char16 to_char16(const std::string& value);
1443 #if defined(__cpp_lib_char8_t)
1444  static char16 to_char16(const std::u8string& value);
1445 #endif
1446  static char16 to_char16(const std::u16string& value);
1447  static char16 to_char16(const std::u32string& value);
1448  static char16 to_char16(const std::wstring& value);
1449  static char16 to_char16(const char* value);
1450  static char16 to_char16(char* value);
1451 #if defined(__cpp_lib_char8_t)
1452  static char16 to_char16(const char8* value);
1453  static char16 to_char16(char8* value);
1454 #endif
1455  static char16 to_char16(const char16* value);
1456  static char16 to_char16(char16* value);
1457  static char16 to_char16(const char32* value);
1458  static char16 to_char16(char32* value);
1459  static char16 to_char16(const wchar* value);
1460  static char16 to_char16(wchar* value);
1470  template<typename type_t>
1471  static char16 to_char16(type_t value) noexcept {
1472  return static_cast<char16>(value);
1473  }
1474 
1483  static char32 to_char32(std::any value);
1492  static char32 to_char32(bool value);
1501  static char32 to_char32(xtd::byte value) noexcept;
1510  static char32 to_char32(char value) noexcept;
1511 #if defined(__cpp_lib_char8_t)
1512  static char32 to_char32(char8 value) noexcept;
1521 #endif
1522  static char32 to_char32(char16 value) noexcept;
1539  static char32 to_char32(char32 value) noexcept;
1548  static char32 to_char32(wchar value) noexcept;
1558  static char32 to_char32(decimal value);
1569  static char32 to_char32(double value);
1580  static char32 to_char32(float value);
1590  static char32 to_char32(int16 value);
1600  static char32 to_char32(int32 value);
1610  static char32 to_char32(int64 value);
1620  static char32 to_char32(slong value);
1630  static char32 to_char32(sbyte value);
1639  static char32 to_char32(uint16 value) noexcept;
1648  static char32 to_char32(uint32 value) noexcept;
1658  static char32 to_char32(uint64 value);
1668  static char32 to_char32(xtd::ulong value);
1678  static char32 to_char32(const xtd::ustring& value);
1680  static char32 to_char32(const std::string& value);
1681 #if defined(__cpp_lib_char8_t)
1682  static char32 to_char32(const std::u8string& value);
1683 #endif
1684  static char32 to_char32(const std::u16string& value);
1685  static char32 to_char32(const std::u32string& value);
1686  static char32 to_char32(const std::wstring& value);
1687  static char32 to_char32(const char* value);
1688  static char32 to_char32(char* value);
1689 #if defined(__cpp_lib_char8_t)
1690  static char32 to_char32(const char8* value);
1691  static char32 to_char32(char8* value);
1692 #endif
1693  static char32 to_char32(const char16* value);
1694  static char32 to_char32(char16* value);
1695  static char32 to_char32(const char32* value);
1696  static char32 to_char32(char32* value);
1697  static char32 to_char32(const wchar* value);
1698  static char32 to_char32(wchar* value);
1708  template<typename type_t>
1709  static char32 to_char32(type_t value) noexcept {
1710  return static_cast<char32>(value);
1711  }
1712 
1721  static wchar to_wchar(std::any value);
1730  static wchar to_wchar(bool value);
1739  static wchar to_wchar(xtd::byte value) noexcept;
1748  static wchar to_wchar(char value) noexcept;
1749 #if defined(__cpp_lib_char8_t)
1750  static wchar to_wchar(char8 value) noexcept;
1759 #endif
1760  static wchar to_wchar(char16 value) noexcept;
1778  static wchar to_wchar(char32 value);
1787  static wchar to_wchar(wchar value) noexcept;
1797  static wchar to_wchar(decimal value);
1808  static wchar to_wchar(double value);
1819  static wchar to_wchar(float value);
1829  static wchar to_wchar(int16 value);
1839  static wchar to_wchar(int32 value);
1849  static wchar to_wchar(int64 value);
1859  static wchar to_wchar(slong value);
1869  static wchar to_wchar(sbyte value);
1878  static wchar to_wchar(uint16 value) noexcept;
1888  static wchar to_wchar(uint32 value);
1898  static wchar to_wchar(uint64 value);
1908  static wchar to_wchar(xtd::ulong value);
1918  static wchar to_wchar(const xtd::ustring& value);
1920  static wchar to_wchar(const std::string& value);
1921 #if defined(__cpp_lib_char8_t)
1922  static wchar to_wchar(const std::u8string& value);
1923 #endif
1924  static wchar to_wchar(const std::u16string& value);
1925  static wchar to_wchar(const std::u32string& value);
1926  static wchar to_wchar(const std::wstring& value);
1927  static wchar to_wchar(const char* value);
1928  static wchar to_wchar(char* value);
1929 #if defined(__cpp_lib_char8_t)
1930  static wchar to_wchar(const char8* value);
1931  static wchar to_wchar(char8* value);
1932 #endif
1933  static wchar to_wchar(const char16* value);
1934  static wchar to_wchar(char16* value);
1935  static wchar to_wchar(const char32* value);
1936  static wchar to_wchar(char32* value);
1937  static wchar to_wchar(const wchar* value);
1938  static wchar to_wchar(wchar* value);
1948  template<typename type_t>
1949  static wchar to_wchar(type_t value) noexcept {
1950  return static_cast<wchar>(value);
1951  }
1952 
1961  static decimal to_decimal(std::any value);
1970  static decimal to_decimal(bool value) noexcept;
1979  static decimal to_decimal(xtd::byte value) noexcept;
1988  static decimal to_decimal(char value) noexcept;
1989 #if defined(__cpp_lib_char8_t)
1990  static decimal to_decimal(char8 value) noexcept;
1999 #endif
2000  static decimal to_decimal(char16 value) noexcept;
2017  static decimal to_decimal(char32 value) noexcept;
2026  static decimal to_decimal(wchar value) noexcept;
2036  static decimal to_decimal(decimal value) noexcept;
2046  static decimal to_decimal(double value) noexcept;
2056  static decimal to_decimal(float value) noexcept;
2065  static decimal to_decimal(int16 value) noexcept;
2074  static decimal to_decimal(int32 value) noexcept;
2083  static decimal to_decimal(int64 value) noexcept;
2092  static decimal to_decimal(slong value) noexcept;
2101  static decimal to_decimal(sbyte value) noexcept;
2110  static decimal to_decimal(uint16 value) noexcept;
2119  static decimal to_decimal(uint32 value) noexcept;
2128  static decimal to_decimal(uint64 value) noexcept;
2137  static decimal to_decimal(xtd::ulong value) noexcept;
2147  static decimal to_decimal(const xtd::ustring& value);
2149  static decimal to_decimal(const std::string& value);
2150 #if defined(__cpp_lib_char8_t)
2151  static decimal to_decimal(const std::u8string& value);
2152 #endif
2153  static decimal to_decimal(const std::u16string& value);
2154  static decimal to_decimal(const std::u32string& value);
2155  static decimal to_decimal(const std::wstring& value);
2156  static decimal to_decimal(const char* value);
2157  static decimal to_decimal(char* value);
2158 #if defined(__cpp_lib_char8_t)
2159  static decimal to_decimal(const char8* value);
2160  static decimal to_decimal(char8* value);
2161 #endif
2162  static decimal to_decimal(const char16* value);
2163  static decimal to_decimal(char16* value);
2164  static decimal to_decimal(const char32* value);
2165  static decimal to_decimal(char32* value);
2166  static decimal to_decimal(const wchar* value);
2167  static decimal to_decimal(wchar* value);
2177  template<typename type_t>
2178  static decimal to_decimal(type_t value) noexcept {
2179  return static_cast<decimal>(value);
2180  }
2181 
2190  static double to_double(std::any value);
2199  static double to_double(bool value) noexcept;
2208  static double to_double(xtd::byte value) noexcept;
2217  static double to_double(char value) noexcept;
2218 #if defined(__cpp_lib_char8_t)
2219  static double to_double(char8 value) noexcept;
2228 #endif
2229  static double to_double(char16 value) noexcept;
2246  static double to_double(char32 value) noexcept;
2255  static double to_double(wchar value) noexcept;
2265  static double to_double(decimal value) noexcept;
2275  static double to_double(double value) noexcept;
2285  static double to_double(float value) noexcept;
2294  static double to_double(int16 value) noexcept;
2303  static double to_double(int32 value) noexcept;
2312  static double to_double(int64 value) noexcept;
2321  static double to_double(slong value) noexcept;
2330  static double to_double(sbyte value) noexcept;
2339  static double to_double(uint16 value) noexcept;
2348  static double to_double(uint32 value) noexcept;
2357  static double to_double(uint64 value) noexcept;
2366  static double to_double(xtd::ulong value) noexcept;
2376  static double to_double(const xtd::ustring& value);
2378  static double to_double(const std::string& value);
2379 #if defined(__cpp_lib_char8_t)
2380  static double to_double(const std::u8string& value);
2381 #endif
2382  static double to_double(const std::u16string& value);
2383  static double to_double(const std::u32string& value);
2384  static double to_double(const std::wstring& value);
2385  static double to_double(const char* value);
2386  static double to_double(char* value);
2387 #if defined(__cpp_lib_char8_t)
2388  static double to_double(const char8* value);
2389  static double to_double(char8* value);
2390 #endif
2391  static double to_double(const char16* value);
2392  static double to_double(char16* value);
2393  static double to_double(const char32* value);
2394  static double to_double(char32* value);
2395  static double to_double(const wchar* value);
2396  static double to_double(wchar* value);
2406  template<typename type_t>
2407  static double to_double(type_t value) noexcept {
2408  return static_cast<double>(value);
2409  }
2410 
2419  static float to_single(std::any value);
2428  static float to_single(bool value) noexcept;
2437  static float to_single(xtd::byte value) noexcept;
2446  static float to_single(char value) noexcept;
2447 #if defined(__cpp_lib_char8_t)
2448  static float to_single(char8 value) noexcept;
2457 #endif
2458  static float to_single(char16 value) noexcept;
2475  static float to_single(char32 value) noexcept;
2484  static float to_single(wchar value) noexcept;
2494  static float to_single(decimal value) noexcept;
2504  static float to_single(double value) noexcept;
2514  static float to_single(float value) noexcept;
2523  static float to_single(int16 value) noexcept;
2532  static float to_single(int32 value) noexcept;
2541  static float to_single(int64 value) noexcept;
2550  static float to_single(slong value) noexcept;
2559  static float to_single(sbyte value) noexcept;
2568  static float to_single(uint16 value) noexcept;
2577  static float to_single(uint32 value) noexcept;
2586  static float to_single(uint64 value) noexcept;
2595  static float to_single(xtd::ulong value) noexcept;
2605  static float to_single(const xtd::ustring& value);
2607  static float to_single(const std::string& value);
2608 #if defined(__cpp_lib_char8_t)
2609  static float to_single(const std::u8string& value);
2610 #endif
2611  static float to_single(const std::u16string& value);
2612  static float to_single(const std::u32string& value);
2613  static float to_single(const std::wstring& value);
2614  static float to_single(const char* value);
2615  static float to_single(char* value);
2616 #if defined(__cpp_lib_char8_t)
2617  static float to_single(const char8* value);
2618  static float to_single(char8* value);
2619 #endif
2620  static float to_single(const char16* value);
2621  static float to_single(char16* value);
2622  static float to_single(const char32* value);
2623  static float to_single(char32* value);
2624  static float to_single(const wchar* value);
2625  static float to_single(wchar* value);
2635  template<typename type_t>
2636  static float to_single(type_t value) noexcept {
2637  return static_cast<float>(value);
2638  }
2639 
2648  static int16 to_int16(std::any value);
2657  static int16 to_int16(bool value) noexcept;
2666  static int16 to_int16(xtd::byte value) noexcept;
2675  static int16 to_int16(char value) noexcept;
2676 #if defined(__cpp_lib_char8_t)
2677  static int16 to_int16(char8 value) noexcept;
2686 #endif
2687  static int16 to_int16(char16 value) noexcept;
2705  static int16 to_int16(char32 value);
2714  static int16 to_int16(wchar value) noexcept;
2725  static int16 to_int16(decimal value);
2736  static int16 to_int16(double value);
2747  static int16 to_int16(float value);
2756  static int16 to_int16(int16 value) noexcept;
2766  static int16 to_int16(int32 value);
2776  static int16 to_int16(int64 value);
2786  static int16 to_int16(slong value);
2795  static int16 to_int16(sbyte value) noexcept;
2805  static int16 to_int16(uint16 value);
2815  static int16 to_int16(uint32 value);
2825  static int16 to_int16(uint64 value);
2835  static int16 to_int16(xtd::ulong value);
2845  static int16 to_int16(const xtd::ustring& value);
2856  static int16 to_int16(const xtd::ustring& value, xtd::byte from_base);
2858  static int16 to_int16(const std::string& value);
2859 #if defined(__cpp_lib_char8_t)
2860  static int16 to_int16(const std::u8string& value);
2861 #endif
2862  static int16 to_int16(const std::u16string& value);
2863  static int16 to_int16(const std::u32string& value);
2864  static int16 to_int16(const std::wstring& value);
2865  static int16 to_int16(const char* value);
2866  static int16 to_int16(char* value);
2867 #if defined(__cpp_lib_char8_t)
2868  static int16 to_int16(const char8* value);
2869  static int16 to_int16(char8* value);
2870 #endif
2871  static int16 to_int16(const char16* value);
2872  static int16 to_int16(char16* value);
2873  static int16 to_int16(const char32* value);
2874  static int16 to_int16(char32* value);
2875  static int16 to_int16(const wchar* value);
2876  static int16 to_int16(wchar* value);
2886  template<typename type_t>
2887  static int16 to_int16(type_t value) noexcept {
2888  return static_cast<int16>(value);
2889  }
2890 
2899  static int32 to_int32(std::any value);
2908  static int32 to_int32(bool value) noexcept;
2917  static int32 to_int32(xtd::byte value) noexcept;
2926  static int32 to_int32(char value) noexcept;
2927 #if defined(__cpp_lib_char8_t)
2928  static int32 to_int32(char8 value) noexcept;
2937 #endif
2938  static int32 to_int32(char16 value) noexcept;
2955  static int32 to_int32(char32 value) noexcept;
2964  static int32 to_int32(wchar value) noexcept;
2975  static int32 to_int32(decimal value);
2986  static int32 to_int32(double value);
2996  static int32 to_int32(float value) noexcept;
3005  static int32 to_int32(int16 value) noexcept;
3015  static int32 to_int32(int32 value) noexcept;
3024  static int32 to_int32(int64 value);
3034  static int32 to_int32(slong value);
3043  static int32 to_int32(sbyte value) noexcept;
3052  static int32 to_int32(uint16 value) noexcept;
3062  static int32 to_int32(uint32 value);
3072  static int32 to_int32(uint64 value);
3082  static int32 to_int32(xtd::ulong value);
3092  static int32 to_int32(const xtd::ustring& value);
3103  static int32 to_int32(const xtd::ustring& value, xtd::byte from_base);
3105  static int32 to_int32(const std::string& value);
3106 #if defined(__cpp_lib_char8_t)
3107  static int32 to_int32(const std::u8string& value);
3108 #endif
3109  static int32 to_int32(const std::u16string& value);
3110  static int32 to_int32(const std::u32string& value);
3111  static int32 to_int32(const std::wstring& value);
3112  static int32 to_int32(const char* value);
3113  static int32 to_int32(char* value);
3114 #if defined(__cpp_lib_char8_t)
3115  static int32 to_int32(const char8* value);
3116  static int32 to_int32(char8* value);
3117 #endif
3118  static int32 to_int32(const char16* value);
3119  static int32 to_int32(char16* value);
3120  static int32 to_int32(const char32* value);
3121  static int32 to_int32(char32* value);
3122  static int32 to_int32(const wchar* value);
3123  static int32 to_int32(wchar* value);
3133  template<typename type_t>
3134  static int32 to_int32(type_t value) noexcept {
3135  return static_cast<int32>(value);
3136  }
3137 
3146  static int64 to_int64(std::any value);
3155  static int64 to_int64(bool value) noexcept;
3164  static int64 to_int64(xtd::byte value) noexcept;
3173  static int64 to_int64(char value) noexcept;
3174 #if defined(__cpp_lib_char8_t)
3175  static int64 to_int64(char8 value) noexcept;
3184 #endif
3185  static int64 to_int64(char16 value) noexcept;
3202  static int64 to_int64(char32 value) noexcept;
3211  static int64 to_int64(wchar value) noexcept;
3221  static int64 to_int64(decimal value) noexcept;
3231  static int64 to_int64(double value) noexcept;
3241  static int64 to_int64(float value) noexcept;
3250  static int64 to_int64(int16 value) noexcept;
3259  static int64 to_int64(int32 value) noexcept;
3268  static int64 to_int64(int64 value) noexcept;
3277  static int64 to_int64(slong value) noexcept;
3286  static int64 to_int64(sbyte value) noexcept;
3295  static int64 to_int64(uint16 value) noexcept;
3304  static int64 to_int64(uint32 value) noexcept;
3314  static int64 to_int64(uint64 value);
3324  static int64 to_int64(xtd::ulong value);
3334  static int64 to_int64(const xtd::ustring& value);
3345  static int64 to_int64(const xtd::ustring& value, xtd::byte from_base);
3347  static int64 to_int64(const std::string& value);
3348 #if defined(__cpp_lib_char8_t)
3349  static int64 to_int64(const std::u8string& value);
3350 #endif
3351  static int64 to_int64(const std::u16string& value);
3352  static int64 to_int64(const std::u32string& value);
3353  static int64 to_int64(const std::wstring& value);
3354  static int64 to_int64(const char* value);
3355  static int64 to_int64(char* value);
3356 #if defined(__cpp_lib_char8_t)
3357  static int64 to_int64(const char8* value);
3358  static int64 to_int64(char8* value);
3359 #endif
3360  static int64 to_int64(const char16* value);
3361  static int64 to_int64(char16* value);
3362  static int64 to_int64(const char32* value);
3363  static int64 to_int64(char32* value);
3364  static int64 to_int64(const wchar* value);
3365  static int64 to_int64(wchar* value);
3375  template<typename type_t>
3376  static int64 to_int64(type_t value) noexcept {
3377  return static_cast<int64>(value);
3378  }
3379 
3388  static slong to_llong(std::any value);
3397  static slong to_llong(bool value) noexcept;
3406  static slong to_llong(xtd::byte value) noexcept;
3415  static slong to_llong(char value) noexcept;
3416 #if defined(__cpp_lib_char8_t)
3417  static slong to_llong(char8 value) noexcept;
3426 #endif
3427  static slong to_llong(char16 value) noexcept;
3444  static slong to_llong(char32 value) noexcept;
3453  static slong to_llong(wchar value) noexcept;
3463  static slong to_llong(decimal value) noexcept;
3473  static slong to_llong(double value) noexcept;
3483  static slong to_llong(float value) noexcept;
3492  static slong to_llong(int16 value) noexcept;
3501  static slong to_llong(int32 value) noexcept;
3510  static slong to_llong(int64 value) noexcept;
3519  static slong to_llong(slong value) noexcept;
3528  static slong to_llong(sbyte value) noexcept;
3537  static slong to_llong(uint16 value) noexcept;
3546  static slong to_llong(uint32 value) noexcept;
3556  static slong to_llong(uint64 value);
3566  static slong to_llong(xtd::ulong value);
3576  static slong to_llong(const xtd::ustring& value);
3587  static slong to_llong(const xtd::ustring& value, xtd::byte from_base);
3589  static slong to_llong(const std::string& value);
3590 #if defined(__cpp_lib_char8_t)
3591  static slong to_llong(const std::u8string& value);
3592 #endif
3593  static slong to_llong(const std::u16string& value);
3594  static slong to_llong(const std::u32string& value);
3595  static slong to_llong(const std::wstring& value);
3596  static slong to_llong(const char* value);
3597  static slong to_llong(char* value);
3598 #if defined(__cpp_lib_char8_t)
3599  static slong to_llong(const char8* value);
3600  static slong to_llong(char8* value);
3601 #endif
3602  static slong to_llong(const char16* value);
3603  static slong to_llong(char16* value);
3604  static slong to_llong(const char32* value);
3605  static slong to_llong(char32* value);
3606  static slong to_llong(const wchar* value);
3607  static slong to_llong(wchar* value);
3617  template<typename type_t>
3618  static slong to_llong(type_t value) noexcept {
3619  return static_cast<slong>(value);
3620  }
3621 
3630  static sbyte to_sbyte(std::any value);
3639  static sbyte to_sbyte(bool value) noexcept;
3648  static sbyte to_sbyte(xtd::byte value) noexcept;
3657  static sbyte to_sbyte(char value) noexcept;
3658 #if defined(__cpp_lib_char8_t)
3659  static sbyte to_sbyte(char8 value) noexcept;
3668 #endif
3669  static sbyte to_sbyte(char16 value);
3688  static sbyte to_sbyte(char32 value);
3698  static sbyte to_sbyte(wchar value);
3709  static sbyte to_sbyte(decimal value);
3720  static sbyte to_sbyte(double value);
3731  static sbyte to_sbyte(float value);
3741  static sbyte to_sbyte(int16 value);
3751  static sbyte to_sbyte(int32 value);
3761  static sbyte to_sbyte(int64 value);
3771  static sbyte to_sbyte(slong value);
3781  static sbyte to_sbyte(sbyte value);
3791  static sbyte to_sbyte(uint16 value);
3801  static sbyte to_sbyte(uint32 value);
3811  static sbyte to_sbyte(uint64 value);
3821  static sbyte to_sbyte(xtd::ulong value);
3831  static sbyte to_sbyte(const xtd::ustring& value);
3842  static sbyte to_sbyte(const xtd::ustring& value, xtd::byte from_base);
3844  static sbyte to_sbyte(const std::string& value);
3845 #if defined(__cpp_lib_char8_t)
3846  static sbyte to_sbyte(const std::u8string& value);
3847 #endif
3848  static sbyte to_sbyte(const std::u16string& value);
3849  static sbyte to_sbyte(const std::u32string& value);
3850  static sbyte to_sbyte(const std::wstring& value);
3851  static sbyte to_sbyte(const char* value);
3852  static sbyte to_sbyte(char* value);
3853 #if defined(__cpp_lib_char8_t)
3854  static sbyte to_sbyte(const char8* value);
3855  static sbyte to_sbyte(char8* value);
3856 #endif
3857  static sbyte to_sbyte(const char16* value);
3858  static sbyte to_sbyte(char16* value);
3859  static sbyte to_sbyte(const char32* value);
3860  static sbyte to_sbyte(char32* value);
3861  static sbyte to_sbyte(const wchar* value);
3862  static sbyte to_sbyte(wchar* value);
3872  template<typename type_t>
3873  static sbyte to_sbyte(type_t value) noexcept {
3874  return static_cast<sbyte>(value);
3875  }
3876 
3885  static uint16 to_uint16(std::any value);
3894  static uint16 to_uint16(bool value) noexcept;
3903  static uint16 to_uint16(xtd::byte value) noexcept;
3912  static uint16 to_uint16(char value) noexcept;
3913 #if defined(__cpp_lib_char8_t)
3914  static uint16 to_uint16(char8 value) noexcept;
3923 #endif
3924  static uint16 to_uint16(char16 value) noexcept;
3942  static uint16 to_uint16(char32 value);
3951  static uint16 to_uint16(wchar value) noexcept;
3962  static uint16 to_uint16(decimal value);
3973  static uint16 to_uint16(double value);
3984  static uint16 to_uint16(float value);
3994  static uint16 to_uint16(int16 value);
4004  static uint16 to_uint16(int32 value);
4014  static uint16 to_uint16(int64 value);
4024  static uint16 to_uint16(slong value);
4034  static uint16 to_uint16(sbyte value);
4043  static uint16 to_uint16(uint16 value) noexcept;
4053  static uint16 to_uint16(uint32 value);
4063  static uint16 to_uint16(uint64 value);
4073  static uint16 to_uint16(xtd::ulong value);
4083  static uint16 to_uint16(const xtd::ustring& value);
4094  static uint16 to_uint16(const xtd::ustring& value, xtd::byte from_base);
4096  static uint16 to_uint16(const std::string& value);
4097 #if defined(__cpp_lib_char8_t)
4098  static uint16 to_uint16(const std::u8string& value);
4099 #endif
4100  static uint16 to_uint16(const std::u16string& value);
4101  static uint16 to_uint16(const std::u32string& value);
4102  static uint16 to_uint16(const std::wstring& value);
4103  static uint16 to_uint16(const char* value);
4104  static uint16 to_uint16(char* value);
4105 #if defined(__cpp_lib_char8_t)
4106  static uint16 to_uint16(const char8* value);
4107  static uint16 to_uint16(char8* value);
4108 #endif
4109  static uint16 to_uint16(const char16* value);
4110  static uint16 to_uint16(char16* value);
4111  static uint16 to_uint16(const char32* value);
4112  static uint16 to_uint16(char32* value);
4113  static uint16 to_uint16(const wchar* value);
4114  static uint16 to_uint16(wchar* value);
4124  template<typename type_t>
4125  static uint16 to_uint16(type_t value) noexcept {
4126  return static_cast<uint16>(value);
4127  }
4128 
4137  static uint32 to_uint32(std::any value);
4146  static uint32 to_uint32(bool value) noexcept;
4155  static uint32 to_uint32(xtd::byte value) noexcept;
4164  static uint32 to_uint32(char value) noexcept;
4165 #if defined(__cpp_lib_char8_t)
4166  static uint32 to_uint32(char8 value) noexcept;
4175 #endif
4176  static uint32 to_uint32(char16 value) noexcept;
4193  static uint32 to_uint32(char32 value) noexcept;
4202  static uint32 to_uint32(wchar value) noexcept;
4213  static uint32 to_uint32(decimal value);
4224  static uint32 to_uint32(double value);
4235  static uint32 to_uint32(float value);
4245  static uint32 to_uint32(int16 value);
4255  static uint32 to_uint32(int32 value);
4265  static uint32 to_uint32(int64 value);
4275  static uint32 to_uint32(slong value);
4285  static uint32 to_uint32(sbyte value);
4294  static uint32 to_uint32(uint16 value) noexcept;
4303  static uint32 to_uint32(uint32 value) noexcept;
4313  static uint32 to_uint32(uint64 value);
4323  static uint32 to_uint32(xtd::ulong value);
4333  static uint32 to_uint32(const xtd::ustring& value);
4344  static uint32 to_uint32(const xtd::ustring& value, xtd::byte from_base);
4346  static uint32 to_uint32(const std::string& value);
4347 #if defined(__cpp_lib_char8_t)
4348  static uint32 to_uint32(const std::u8string& value);
4349 #endif
4350  static uint32 to_uint32(const std::u16string& value);
4351  static uint32 to_uint32(const std::u32string& value);
4352  static uint32 to_uint32(const std::wstring& value);
4353  static uint32 to_uint32(const char* value);
4354  static uint32 to_uint32(char* value);
4355 #if defined(__cpp_lib_char8_t)
4356  static uint32 to_uint32(const char8* value);
4357  static uint32 to_uint32(char8* value);
4358 #endif
4359  static uint32 to_uint32(const char16* value);
4360  static uint32 to_uint32(char16* value);
4361  static uint32 to_uint32(const char32* value);
4362  static uint32 to_uint32(char32* value);
4363  static uint32 to_uint32(const wchar* value);
4364  static uint32 to_uint32(wchar* value);
4374  template<typename type_t>
4375  static uint32 to_uint32(type_t value) noexcept {
4376  return static_cast<uint32>(value);
4377  }
4378 
4387  static uint64 to_uint64(std::any value);
4396  static uint64 to_uint64(bool value) noexcept;
4405  static uint64 to_uint64(xtd::byte value) noexcept;
4414  static uint64 to_uint64(char value) noexcept;
4415 #if defined(__cpp_lib_char8_t)
4416  static uint64 to_uint64(char8 value) noexcept;
4425 #endif
4426  static uint64 to_uint64(char16 value) noexcept;
4443  static uint64 to_uint64(char32 value) noexcept;
4452  static uint64 to_uint64(wchar value) noexcept;
4463  static uint64 to_uint64(decimal value);
4474  static uint64 to_uint64(double value);
4485  static uint64 to_uint64(float value);
4495  static uint64 to_uint64(int16 value);
4505  static uint64 to_uint64(int32 value);
4515  static uint64 to_uint64(int64 value);
4525  static uint64 to_uint64(slong value);
4535  static uint64 to_uint64(sbyte value);
4544  static uint64 to_uint64(uint16 value) noexcept;
4553  static uint64 to_uint64(uint32 value) noexcept;
4563  static uint64 to_uint64(uint64 value) noexcept;
4572  static uint64 to_uint64(xtd::ulong value) noexcept;
4581  static uint64 to_uint64(const xtd::ustring& value);
4592  static uint64 to_uint64(const xtd::ustring& value, xtd::byte from_base);
4594  static uint64 to_uint64(const std::string& value);
4595 #if defined(__cpp_lib_char8_t)
4596  static uint64 to_uint64(const std::u8string& value);
4597 #endif
4598  static uint64 to_uint64(const std::u16string& value);
4599  static uint64 to_uint64(const std::u32string& value);
4600  static uint64 to_uint64(const std::wstring& value);
4601  static uint64 to_uint64(const char* value);
4602  static uint64 to_uint64(char* value);
4603 #if defined(__cpp_lib_char8_t)
4604  static uint64 to_uint64(const char8* value);
4605  static uint64 to_uint64(char8* value);
4606 #endif
4607  static uint64 to_uint64(const char16* value);
4608  static uint64 to_uint64(char16* value);
4609  static uint64 to_uint64(const char32* value);
4610  static uint64 to_uint64(char32* value);
4611  static uint64 to_uint64(const wchar* value);
4612  static uint64 to_uint64(wchar* value);
4622  template<typename type_t>
4623  static uint64 to_uint64(type_t value) noexcept {
4624  return static_cast<uint64>(value);
4625  }
4626 
4635  static xtd::ulong to_ullong(std::any value);
4644  static xtd::ulong to_ullong(bool value) noexcept;
4653  static xtd::ulong to_ullong(xtd::byte value) noexcept;
4662  static xtd::ulong to_ullong(char value) noexcept;
4663 #if defined(__cpp_lib_char8_t)
4664  static xtd::ulong to_ullong(char8 value) noexcept;
4673 #endif
4674  static xtd::ulong to_ullong(char16 value) noexcept;
4691  static xtd::ulong to_ullong(char32 value) noexcept;
4700  static xtd::ulong to_ullong(wchar value) noexcept;
4711  static xtd::ulong to_ullong(decimal value);
4722  static xtd::ulong to_ullong(double value);
4733  static xtd::ulong to_ullong(float value);
4743  static xtd::ulong to_ullong(int16 value);
4753  static xtd::ulong to_ullong(int32 value);
4763  static xtd::ulong to_ullong(int64 value);
4773  static xtd::ulong to_ullong(slong value);
4783  static xtd::ulong to_ullong(sbyte value);
4792  static xtd::ulong to_ullong(uint16 value) noexcept;
4801  static xtd::ulong to_ullong(uint32 value) noexcept;
4811  static xtd::ulong to_ullong(uint64 value) noexcept;
4820  static xtd::ulong to_ullong(xtd::ulong value) noexcept;
4829  static xtd::ulong to_ullong(const xtd::ustring& value);
4840  static xtd::ulong to_ullong(const xtd::ustring& value, xtd::byte from_base);
4842  static xtd::ulong to_ullong(const std::string& value);
4843 #if defined(__cpp_lib_char8_t)
4844  static xtd::ulong to_ullong(const std::u8string& value);
4845 #endif
4846  static xtd::ulong to_ullong(const std::u16string& value);
4847  static xtd::ulong to_ullong(const std::u32string& value);
4848  static xtd::ulong to_ullong(const std::wstring& value);
4849  static xtd::ulong to_ullong(const char* value);
4850  static xtd::ulong to_ullong(char* value);
4851 #if defined(__cpp_lib_char8_t)
4852  static xtd::ulong to_ullong(const char8* value);
4853  static xtd::ulong to_ullong(char8* value);
4854 #endif
4855  static xtd::ulong to_ullong(const char16* value);
4856  static xtd::ulong to_ullong(char16* value);
4857  static xtd::ulong to_ullong(const char32* value);
4858  static xtd::ulong to_ullong(char32* value);
4859  static xtd::ulong to_ullong(const wchar* value);
4860  static xtd::ulong to_ullong(wchar* value);
4870  template<typename type_t>
4871  static xtd::ulong to_ullong(type_t value) noexcept {
4872  return static_cast<xtd::ulong>(value);
4873  }
4874 
4883  static ustring to_string(std::any value);
4892  static ustring to_string(bool value) noexcept;
4901  static ustring to_string(xtd::byte value) noexcept;
4912  static ustring to_string(xtd::byte value, xtd::byte from_base);
4921  static ustring to_string(char value) noexcept;
4922 #if defined(__cpp_lib_char8_t)
4923  static ustring to_string(char8 value) noexcept;
4932 #endif
4933  static ustring to_string(char16 value) noexcept;
4950  static ustring to_string(char32 value) noexcept;
4959  static ustring to_string(wchar value) noexcept;
4970  static ustring to_string(decimal value);
4981  static ustring to_string(double value);
4992  static ustring to_string(float value);
5002  static ustring to_string(int16 value);
5013  static ustring to_string(int16 value, xtd::byte from_base);
5023  static ustring to_string(int32 value);
5034  static ustring to_string(int32 value, xtd::byte from_base);
5044  static ustring to_string(int64 value);
5055  static ustring to_string(int64 value, xtd::byte from_base);
5065  static ustring to_string(slong value);
5076  static ustring to_string(slong value, xtd::byte from_base);
5086  static ustring to_string(sbyte value);
5097  static ustring to_string(sbyte value, xtd::byte from_base);
5106  static ustring to_string(uint16 value) noexcept;
5117  static ustring to_string(uint16 value, xtd::byte from_base);
5126  static ustring to_string(uint32 value) noexcept;
5137  static ustring to_string(uint32 value, xtd::byte from_base);
5147  static ustring to_string(uint64 value) noexcept;
5158  static ustring to_string(uint64 value, xtd::byte from_base);
5167  static ustring to_string(xtd::ulong value) noexcept;
5178  static ustring to_string(xtd::ulong value, xtd::byte from_base);
5187  static ustring to_string(const xtd::ustring& value);
5189  static ustring to_string(const std::string& value);
5190 #if defined(__cpp_lib_char8_t)
5191  static ustring to_string(const std::u8string& value);
5192 #endif
5193  static ustring to_string(const std::u16string& value);
5194  static ustring to_string(const std::u32string& value);
5195  static ustring to_string(const std::wstring& value);
5196  static ustring to_string(const char* value);
5197  static ustring to_string(char* value);
5198 #if defined(__cpp_lib_char8_t)
5199  static ustring to_string(const char8* value);
5200  static ustring to_string(char8* value);
5201 #endif
5202  static ustring to_string(const char16* value);
5203  static ustring to_string(char16* value);
5204  static ustring to_string(const char32* value);
5205  static ustring to_string(char32* value);
5206  static ustring to_string(const wchar* value);
5207  static ustring to_string(wchar* value);
5217  template<typename type_t>
5218  static ustring to_string(type_t value) noexcept {
5219  return ustring::format("{}", value);
5220  }
5221 
5230  static ustring to_ustring(std::any value);
5239  static ustring to_ustring(bool value) noexcept;
5248  static ustring to_ustring(xtd::byte value) noexcept;
5259  static ustring to_ustring(xtd::byte value, xtd::byte from_base);
5268  static ustring to_ustring(char value) noexcept;
5269 #if defined(__cpp_lib_char8_t)
5270  static ustring to_ustring(char8 value) noexcept;
5279 #endif
5280  static ustring to_ustring(char16 value) noexcept;
5297  static ustring to_ustring(char32 value) noexcept;
5306  static ustring to_ustring(wchar value) noexcept;
5317  static ustring to_ustring(decimal value);
5328  static ustring to_ustring(double value);
5339  static ustring to_ustring(float value);
5349  static ustring to_ustring(int16 value);
5360  static ustring to_ustring(int16 value, xtd::byte from_base);
5370  static ustring to_ustring(int32 value);
5381  static ustring to_ustring(int32 value, xtd::byte from_base);
5391  static ustring to_ustring(int64 value);
5402  static ustring to_ustring(int64 value, xtd::byte from_base);
5412  static ustring to_ustring(slong value);
5423  static ustring to_ustring(slong value, xtd::byte from_base);
5433  static ustring to_ustring(sbyte value);
5444  static ustring to_ustring(sbyte value, xtd::byte from_base);
5453  static ustring to_ustring(uint16 value) noexcept;
5464  static ustring to_ustring(uint16 value, xtd::byte from_base);
5473  static ustring to_ustring(uint32 value) noexcept;
5484  static ustring to_ustring(uint32 value, xtd::byte from_base);
5494  static ustring to_ustring(uint64 value) noexcept;
5505  static ustring to_ustring(uint64 value, xtd::byte from_base);
5514  static ustring to_ustring(xtd::ulong value) noexcept;
5525  static ustring to_ustring(xtd::ulong value, xtd::byte from_base);
5534  static ustring to_ustring(const xtd::ustring& value);
5536  static ustring to_ustring(const std::string& value);
5537 #if defined(__cpp_lib_char8_t)
5538  static ustring to_ustring(const std::u8string& value);
5539 #endif
5540  static ustring to_ustring(const std::u16string& value);
5541  static ustring to_ustring(const std::u32string& value);
5542  static ustring to_ustring(const std::wstring& value);
5543  static ustring to_ustring(const char* value);
5544  static ustring to_ustring(char* value);
5545 #if defined(__cpp_lib_char8_t)
5546  static ustring to_ustring(const char8* value);
5547  static ustring to_ustring(char8* value);
5548 #endif
5549  static ustring to_ustring(const char16* value);
5550  static ustring to_ustring(char16* value);
5551  static ustring to_ustring(const char32* value);
5552  static ustring to_ustring(char32* value);
5553  static ustring to_ustring(const wchar* value);
5554  static ustring to_ustring(wchar* value);
5564  template<typename type_t>
5565  static ustring to_ustring(type_t value) noexcept {
5566  return ustring::format("{}", value);
5567  }
5569  };
5570 }
Contains xtd::static_object class.
static int16 to_int16(type_t value) noexcept
Convert type_t to int16.
Definition: convert.h:2887
static sbyte to_sbyte(type_t value) noexcept
Convert type_t to sbyte.
Definition: convert.h:3873
Contains xtd fundamental types.
static uint64 to_uint64(std::any value)
Convert std::any to uint64.
static ustring to_string(std::any value)
Convert std::any to ustring.
int_least8_t sbyte
Represents a 8-bit signed integer.
Definition: types.h:173
Contains xtd::format_exception exception.
#define static_
This keyword is use to represent a static object. A static object can&#39;t be instantiated (constructors...
Definition: static.h:37
long double decimal
Represents a decimal-precision floating-point number.
Definition: types.h:96
static xtd::byte to_byte(type_t value) noexcept
Convert type_t to byte.
Definition: convert.h:749
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
static char32 to_char32(type_t value) noexcept
Convert type_t to char32.
Definition: convert.h:1709
static int32 to_int32(std::any value)
Convert std::any to int32.
#define csf_
Provides information about the current stack frame.
Definition: current_stack_frame.h:30
uint_least16_t uint16
Represents a 16-bit unsigned integer.
Definition: types.h:228
static wchar to_wchar(std::any value)
Convert std::any to wchar.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
static int16 to_int16(std::any value)
Convert std::any to int16.
static slong to_llong(std::any value)
Convert std::any to slong.
static sbyte to_sbyte(std::any value)
Convert std::any to sbyte.
static bool to_boolean(type_t value) noexcept
Convert type_t to bool.
Definition: convert.h:494
static char16 to_char16(type_t value) noexcept
Convert type_t to char16.
Definition: convert.h:1471
Contains std::any type and std::bad_any_cast exception.
static slong to_llong(type_t value) noexcept
Convert type_t to slong.
Definition: convert.h:3618
static bool to_boolean(std::any value)
Convert std::any to bool.
static char to_char(std::any value)
Convert std::any to char.
Represents API to convert base type code.
Definition: convert.h:25
static char8 to_char8(std::any value)
Convert std::any to char8.
static double to_double(std::any value)
Convert std::any to double.
static float to_single(std::any value)
Convert std::any to single.
static decimal to_decimal(std::any value)
Convert std::any to decimal.
static xtd::ulong to_ullong(type_t value) noexcept
Convert type_t to xtd::ulong.
Definition: convert.h:4871
static decimal to_decimal(type_t value) noexcept
Convert type_t to decimal.
Definition: convert.h:2178
Contains xtd::overflow_exception exception.
static xtd::byte to_byte(std::any value)
Convert std::any to byte.
static wchar to_wchar(type_t value) noexcept
Convert type_t to wchar.
Definition: convert.h:1949
static uint32 to_uint32(std::any value)
Convert std::any to uint32.
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition: types.h:206
static uint16 to_uint16(std::any value)
Convert std::any to uint16.
Contains xtd::ustring class.
static ustring to_ustring(std::any value)
Convert std::any to ustring.
static std::any to_any(std::any value) noexcept
Convert std::any to std::any.
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
int_least16_t int16
Represents a 16-bit signed integer.
Definition: types.h:118
static ustring to_string(type_t value) noexcept
Convert type_t to ustring.
Definition: convert.h:5218
static uint32 to_uint32(type_t value) noexcept
Convert type_t to uint32.
Definition: convert.h:4375
static char8 to_char8(type_t value) noexcept
Convert type_t to char8.
Definition: convert.h:1230
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
char32_t char32
Represents a 32-bit unicode character.
Definition: types.h:85
static float to_single(type_t value) noexcept
Convert type_t to single.
Definition: convert.h:2636
static char16 to_char16(std::any value)
Convert std::any to char16.
static char32 to_char32(std::any value)
Convert std::any to char32.
static ustring format(const ustring &fmt, args_t &&... args)
Writes the text representation of the specified arguments list, to string using the specified format ...
Definition: ustring.h:744
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition: types.h:272
The exception that is thrown for invalid casting or explicit conversion.
Definition: invalid_cast_exception.h:18
Contains xtd::invalid_cast_exception exception.
Contains xtd::argument_exception exception.
static std::any to_any(type_t value)
Convert type_t to bool.
Definition: convert.h:255
static uint16 to_uint16(type_t value) noexcept
Convert type_t to uint16.
Definition: convert.h:4125
static double to_double(type_t value) noexcept
Convert type_t to double.
Definition: convert.h:2407
uint_least64_t uint64
Represents a 64-bit unsigned integer.
Definition: types.h:250
char8_t char8
Represents a 8-bit unicode character.
Definition: types.h:62
int_least64_t int64
Represents a 64-bit signed integer.
Definition: types.h:140
uint_least8_t byte
Represents a 8-bit unsigned integer.
Definition: types.h:39
static int64 to_int64(std::any value)
Convert std::any to int64.
uint_least32_t uint32
Represents a 32-bit unsigned integer.
Definition: types.h:239
char16_t char16
Represents a 16-bit unicode character.
Definition: types.h:74
static int64 to_int64(type_t value) noexcept
Convert type_t to int64.
Definition: convert.h:3376
static ustring to_ustring(type_t value) noexcept
Convert type_t to ustring.
Definition: convert.h:5565
static char to_char(type_t value) noexcept
Convert type_t to char.
Definition: convert.h:992
static int32 to_int32(type_t value) noexcept
Convert type_t to int32.
Definition: convert.h:3134
wchar_t wchar
Represents a wide character.
Definition: types.h:284