xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
xtd::convert_string Class Reference

#include <convert_string.h>

Definition

Represents API to convert string containers.

Namespace
xtd
Library
xtd.core
Remarks
This class cannot be inherited.
This class is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Remarks
To change the encoded format use xtd::text::encoding with xtd::ustring class.

Inherits xtd::static_object.

Static Public Member Functions

static std::string to_string (char *str) noexcept
 Converts char* to std::string.
 
static std::string to_string (char16_t *str) noexcept
 Converts char16_t* to std::string.
 
static std::string to_string (char32_t *str) noexcept
 Converts char32_t* to std::string.
 
static std::string to_string (char8_t *str) noexcept
 Converts char8_t* to std::string.
 
static std::string to_string (const char *str) noexcept
 Converts const char* to std::string.
 
static std::string to_string (const char16_t *str) noexcept
 Converts const char16_t* to std::string.
 
static std::string to_string (const char32_t *str) noexcept
 Converts const char32_t* to std::string.
 
static std::string to_string (const char8_t *str) noexcept
 Converts const char8_t* to std::string.
 
static const std::string & to_string (const std::string &str) noexcept
 Converts std::string to std::string.
 
static std::string to_string (const std::u16string &str) noexcept
 Converts std::u16string to std::string.
 
static std::string to_string (const std::u32string &str) noexcept
 Converts std::u32string to std::string.
 
static std::string to_string (const std::u8string &str) noexcept
 Converts std::u8string to std::string.
 
static std::string to_string (const std::wstring &str) noexcept
 Converts std::wstring to std::string.
 
static std::string to_string (const wchar_t *str) noexcept
 Converts const wchar_t* to std::string.
 
static std::string to_string (const xtd::ustring &str) noexcept
 Converts xtd::ustring to std::string.
 
static std::string to_string (wchar_t *str) noexcept
 Converts wchar_t* to std::string.
 
static std::u16string to_u16string (char *str) noexcept
 Converts char* to std::u16string.
 
static std::u16string to_u16string (char16_t *str) noexcept
 Converts char16_t* to std::u16string.
 
static std::u16string to_u16string (char32_t *str) noexcept
 Converts char32_t* to std::u16string.
 
static std::u16string to_u16string (char8_t *str) noexcept
 Converts char8_t* to std::u16string.
 
static std::u16string to_u16string (const char *str) noexcept
 Converts const char* to std::u16string.
 
static std::u16string to_u16string (const char16_t *str) noexcept
 Converts const char16_t* to std::u16string.
 
static std::u16string to_u16string (const char32_t *str) noexcept
 Converts const char32_t* to std::u16string.
 
static std::u16string to_u16string (const char8_t *str) noexcept
 Converts const char8_t* to std::u16string.
 
static std::u16string to_u16string (const std::string &str) noexcept
 Converts std::string to std::u16string.
 
static const std::u16string & to_u16string (const std::u16string &str) noexcept
 Converts std::u16string to std::u16string.
 
static std::u16string to_u16string (const std::u32string &str) noexcept
 Converts std::u32string to std::u16string.
 
static std::u16string to_u16string (const std::u8string &str) noexcept
 Converts std::u8string to std::u16string.
 
static std::u16string to_u16string (const std::wstring &str) noexcept
 Converts std::wstring to std::u16string.
 
static std::u16string to_u16string (const wchar_t *str) noexcept
 Converts const wchar_t* to std::u16string.
 
static std::u16string to_u16string (const xtd::ustring &str) noexcept
 Converts xtd::ustring to std::u16string.
 
static std::u16string to_u16string (wchar_t *str) noexcept
 Converts wchar_t* to std::u16string.
 
static std::u32string to_u32string (char *str) noexcept
 Converts char* to std::u32string.
 
static std::u32string to_u32string (char16_t *str) noexcept
 Converts char16_t* to std::u32string.
 
static std::u32string to_u32string (char32_t *str) noexcept
 Converts char32_t* to std::u32string.
 
static std::u32string to_u32string (char8_t *str) noexcept
 Converts char8_t* to std::u32string.
 
static std::u32string to_u32string (const char *str) noexcept
 Converts const char* to std::u32string.
 
static std::u32string to_u32string (const char16_t *str) noexcept
 Converts const char16_t* to std::u32string.
 
static std::u32string to_u32string (const char32_t *str) noexcept
 Converts const char32_t* to std::u32string.
 
static std::u32string to_u32string (const char8_t *str) noexcept
 Converts const char8_t* to std::u32string.
 
static std::u32string to_u32string (const std::string &str) noexcept
 Converts std::string to std::u32string.
 
static std::u32string to_u32string (const std::u16string &str) noexcept
 Converts std::u16string to std::u32string.
 
static const std::u32string & to_u32string (const std::u32string &str) noexcept
 Converts std::u32string to std::u32string.
 
static std::u32string to_u32string (const std::u8string &str) noexcept
 Converts std::u8string to std::u32string.
 
static std::u32string to_u32string (const std::wstring &str) noexcept
 Converts std::wstring to std::u32string.
 
static std::u32string to_u32string (const wchar_t *str) noexcept
 Converts const wchar_t* to std::u32string.
 
static std::u32string to_u32string (const xtd::ustring &str) noexcept
 Converts xtd::ustring to std::u32string.
 
static std::u32string to_u32string (wchar_t *str) noexcept
 Converts wchar_t* to std::u32string.
 
static std::u8string to_u8string (char *str) noexcept
 Converts char* to std::u8string.
 
static std::u8string to_u8string (char16_t *str) noexcept
 Converts char16_t* to std::u8string.
 
static std::u8string to_u8string (char32_t *str) noexcept
 Converts char32_t* to std::u8string.
 
static std::u8string to_u8string (char8_t *str) noexcept
 Converts char8_t* to std::u8string.
 
static std::u8string to_u8string (const char *str) noexcept
 Converts const char* to std::u8string.
 
static std::u8string to_u8string (const char16_t *str) noexcept
 Converts const char16_t* to std::u8string.
 
static std::u8string to_u8string (const char32_t *str) noexcept
 Converts const char32_t* to std::u8string.
 
static std::u8string to_u8string (const char8_t *str) noexcept
 Converts const char8_t* to std::u8string.
 
static std::u8string to_u8string (const std::string &str) noexcept
 Converts std::string to std::u8string.
 
static std::u8string to_u8string (const std::u16string &str) noexcept
 Converts std::u16string to std::u8string.
 
static std::u8string to_u8string (const std::u32string &str) noexcept
 Converts std::u32string to std::u8string.
 
static const std::u8string & to_u8string (const std::u8string &str) noexcept
 Converts std::u8string to std::u8string.
 
static std::u8string to_u8string (const std::wstring &str) noexcept
 Converts std::wstring to std::u8string.
 
static std::u8string to_u8string (const wchar_t *str) noexcept
 Converts const wchar_t* to std::u8string.
 
static std::u8string to_u8string (const xtd::ustring &str) noexcept
 Converts xtd::ustring to std::u8string.
 
static std::u8string to_u8string (wchar_t *str) noexcept
 Converts wchar_t* to std::u8string.
 
static xtd::ustring to_ustring (char *str) noexcept
 Converts char* to xtd::ustring.
 
static xtd::ustring to_ustring (char16_t *str) noexcept
 Converts char16_t* to xtd::ustring.
 
static xtd::ustring to_ustring (char32_t *str) noexcept
 Converts char32_t* to xtd::ustring.
 
static xtd::ustring to_ustring (char8_t *str) noexcept
 Converts char8_t* to xtd::ustring.
 
static xtd::ustring to_ustring (const char *str) noexcept
 Converts const char* to xtd::ustring.
 
static xtd::ustring to_ustring (const char16_t *str) noexcept
 Converts const char16_t* to xtd::ustring.
 
static xtd::ustring to_ustring (const char32_t *str) noexcept
 Converts const char32_t* to xtd::ustring.
 
static xtd::ustring to_ustring (const char8_t *str) noexcept
 Converts const char8_t* to xtd::ustring.
 
static xtd::ustring to_ustring (const std::string &str) noexcept
 Converts std::string to xtd::ustring.
 
static xtd::ustring to_ustring (const std::u16string &str) noexcept
 Converts std::u16string to xtd::ustring.
 
static xtd::ustring to_ustring (const std::u32string &str) noexcept
 Converts std::u32string to xtd::ustring.
 
static xtd::ustring to_ustring (const std::u8string &str) noexcept
 Converts std::u8string to xtd::ustring.
 
static xtd::ustring to_ustring (const std::wstring &str) noexcept
 Converts std::wstring to xtd::ustring.
 
static xtd::ustring to_ustring (const wchar_t *str) noexcept
 Converts const wchar_t* to xtd::ustring.
 
static const xtd::ustringto_ustring (const xtd::ustring &str) noexcept
 Converts xtd::ustring to xtd::ustring.
 
static xtd::ustring to_ustring (wchar_t *str) noexcept
 Converts wchar_t* to xtd::ustring.
 
static std::wstring to_wstring (char *str) noexcept
 Converts char* to std::wstring.
 
static std::wstring to_wstring (char16_t *str) noexcept
 Converts char16_t* to std::wstring.
 
static std::wstring to_wstring (char32_t *str) noexcept
 Converts char32_t* to std::wstring.
 
static std::wstring to_wstring (char8_t *str) noexcept
 Converts char8_t* to std::wstring.
 
static std::wstring to_wstring (const char *str) noexcept
 Converts const char* to std::wstring.
 
static std::wstring to_wstring (const char16_t *str) noexcept
 Converts const char16_t* to std::wstring.
 
static std::wstring to_wstring (const char32_t *str) noexcept
 Converts const char32_t* to std::wstring.
 
static std::wstring to_wstring (const char8_t *str) noexcept
 Converts const char8_t* to std::wstring.
 
static std::wstring to_wstring (const std::string &str) noexcept
 Converts std::string to std::wstring.
 
static std::wstring to_wstring (const std::u16string &str) noexcept
 Converts std::u16string to std::wstring.
 
static std::wstring to_wstring (const std::u32string &str) noexcept
 Converts std::u32string to std::wstring.
 
static std::wstring to_wstring (const std::u8string &str) noexcept
 Converts std::u8string to std::wstring.
 
static const std::wstring & to_wstring (const std::wstring &str) noexcept
 Converts std::wstring to std::wstring.
 
static std::wstring to_wstring (const wchar_t *str) noexcept
 Converts const wchar_t* to std::wstring.
 
static std::wstring to_wstring (const xtd::ustring &str) noexcept
 Converts xtd::ustring to std::wstring.
 
static std::wstring to_wstring (wchar_t *str) noexcept
 Converts wchar_t* to std::wstring.
 

Member Function Documentation

◆ to_string() [1/16]

static std::string xtd::convert_string::to_string ( char *  str)
staticnoexcept

Converts char* to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
char* c1 = "Gammasoft";
string s1 = string_converter::to_string(c1);

◆ to_string() [2/16]

static std::string xtd::convert_string::to_string ( char16_t *  str)
staticnoexcept

Converts char16_t* to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
char16_t* c1 = u"Gammasoft";
string s1 = string_converter::to_string(c1);
@ u
The U key.

◆ to_string() [3/16]

static std::string xtd::convert_string::to_string ( char32_t *  str)
staticnoexcept

Converts char32_t* to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
char32_t* c1 = U"Gammasoft";
string s1 = string_converter::to_string(c1);

◆ to_string() [4/16]

static std::string xtd::convert_string::to_string ( char8_t *  str)
staticnoexcept

Converts char8_t* to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
char8_t* c1 = u8"Gammasoft";
string s1 = string_converter::to_string(c1);

◆ to_string() [5/16]

static std::string xtd::convert_string::to_string ( const char *  str)
staticnoexcept

Converts const char* to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
const char* c1 = "Gammasoft";
string s1 = string_converter::to_string(c1);

◆ to_string() [6/16]

static std::string xtd::convert_string::to_string ( const char16_t *  str)
staticnoexcept

Converts const char16_t* to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
const char16_t* c1 = u"Gammasoft";
string s1 = string_converter::to_string(c1);

◆ to_string() [7/16]

static std::string xtd::convert_string::to_string ( const char32_t *  str)
staticnoexcept

Converts const char32_t* to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
const char32_t* c1 = U"Gammasoft";
string s1 = string_converter::to_string(c1);

◆ to_string() [8/16]

static std::string xtd::convert_string::to_string ( const char8_t *  str)
staticnoexcept

Converts const char8_t* to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
const char8_t* c1 = u8"Gammasoft";
string s1 = string_converter::to_string(c1);

◆ to_string() [9/16]

static const std::string & xtd::convert_string::to_string ( const std::string &  str)
staticnoexcept

Converts std::string to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
string s1 = "Gammasoft";
string s2 = string_converter::to_string(s1);

◆ to_string() [10/16]

static std::string xtd::convert_string::to_string ( const std::u16string &  str)
staticnoexcept

Converts std::u16string to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u16string s1 = u"Gammasoft";
string s2 = string_converter::to_string(s1);

◆ to_string() [11/16]

static std::string xtd::convert_string::to_string ( const std::u32string &  str)
staticnoexcept

Converts std::u32string to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u32string s1 = U"Gammasoft";
string s2 = string_converter::to_string(s1);

◆ to_string() [12/16]

static std::string xtd::convert_string::to_string ( const std::u8string &  str)
staticnoexcept

Converts std::u8string to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u8string s1 = u8"Gammasoft";
string s2 = string_converter::to_string(s1);

◆ to_string() [13/16]

static std::string xtd::convert_string::to_string ( const std::wstring &  str)
staticnoexcept

Converts std::wstring to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
wstring s1 = L"Gammasoft";
string s2 = string_converter::to_string(s1);

◆ to_string() [14/16]

static std::string xtd::convert_string::to_string ( const wchar_t *  str)
staticnoexcept

Converts const wchar_t* to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
const wchar_t* c1 = L"Gammasoft";
string s1 = string_converter::to_string(c1);

◆ to_string() [15/16]

static std::string xtd::convert_string::to_string ( const xtd::ustring str)
staticnoexcept

Converts xtd::ustring to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
ustring s1 = "Gammasoft";
string s2 = string_converter::to_string(s1);
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:48

◆ to_string() [16/16]

static std::string xtd::convert_string::to_string ( wchar_t *  str)
staticnoexcept

Converts wchar_t* to std::string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
wchar_t* c1 = L"Gammasoft";
string s1 = string_converter::to_string(c1);

◆ to_u16string() [1/16]

static std::u16string xtd::convert_string::to_u16string ( char *  str)
staticnoexcept

Converts char* to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char* c1 = "Gammasoft";
u16string s1 = string_converter::to_u16string(c1);

◆ to_u16string() [2/16]

static std::u16string xtd::convert_string::to_u16string ( char16_t *  str)
staticnoexcept

Converts char16_t* to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char16_t* c1 = u"Gammasoft";
u16string s1 = string_converter::to_u16string(c1);

◆ to_u16string() [3/16]

static std::u16string xtd::convert_string::to_u16string ( char32_t *  str)
staticnoexcept

Converts char32_t* to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char32_t* c1 = "Gammasoft";
u16string s1 = string_converter::to_u16string(c1);

◆ to_u16string() [4/16]

static std::u16string xtd::convert_string::to_u16string ( char8_t *  str)
staticnoexcept

Converts char8_t* to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char8_t* c1 = u8"Gammasoft";
u16string s1 = string_converter::to_u16string(c1);

◆ to_u16string() [5/16]

static std::u16string xtd::convert_string::to_u16string ( const char *  str)
staticnoexcept

Converts const char* to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char* c1 = "Gammasoft";
u16string s1 = string_converter::to_u16string(c1);

◆ to_u16string() [6/16]

static std::u16string xtd::convert_string::to_u16string ( const char16_t *  str)
staticnoexcept

Converts const char16_t* to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char16_t* c1 = u"Gammasoft";
u16string s1 = string_converter::to_u16string(c1);

◆ to_u16string() [7/16]

static std::u16string xtd::convert_string::to_u16string ( const char32_t *  str)
staticnoexcept

Converts const char32_t* to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char32_t* c1 = U"Gammasoft";
u16string s1 = string_converter::to_u16string(c1);

◆ to_u16string() [8/16]

static std::u16string xtd::convert_string::to_u16string ( const char8_t *  str)
staticnoexcept

Converts const char8_t* to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char8_t* c1 = u8"Gammasoft";
u16string s1 = string_converter::to_u16string(c1);

◆ to_u16string() [9/16]

static std::u16string xtd::convert_string::to_u16string ( const std::string &  str)
staticnoexcept

Converts std::string to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
string s1 = "Gammasoft";
u16string s2 = string_converter::to_u16string(s1);

◆ to_u16string() [10/16]

static const std::u16string & xtd::convert_string::to_u16string ( const std::u16string &  str)
staticnoexcept

Converts std::u16string to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u16string s1 = u"Gammasoft";
u16string s2 = string_converter::to_u16string(s1);

◆ to_u16string() [11/16]

static std::u16string xtd::convert_string::to_u16string ( const std::u32string &  str)
staticnoexcept

Converts std::u32string to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u32string s1 = U"Gammasoft";
u16string s2 = string_converter::to_u16string(s1);

◆ to_u16string() [12/16]

static std::u16string xtd::convert_string::to_u16string ( const std::u8string &  str)
staticnoexcept

Converts std::u8string to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u8string s1 = u8"Gammasoft";
u16string s2 = string_converter::to_u16string(s1);

◆ to_u16string() [13/16]

static std::u16string xtd::convert_string::to_u16string ( const std::wstring &  str)
staticnoexcept

Converts std::wstring to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
wstring s1 = L"Gammasoft";
u16string s2 = string_converter::to_u16string(s1);

◆ to_u16string() [14/16]

static std::u16string xtd::convert_string::to_u16string ( const wchar_t *  str)
staticnoexcept

Converts const wchar_t* to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const wchar_t* c1 = L"Gammasoft";
u16string s1 = string_converter::to_u16string(c1);

◆ to_u16string() [15/16]

static std::u16string xtd::convert_string::to_u16string ( const xtd::ustring str)
staticnoexcept

Converts xtd::ustring to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
ustring s1 = "Gammasoft";
u16string s2 = string_converter::to_u16string(s1);

◆ to_u16string() [16/16]

static std::u16string xtd::convert_string::to_u16string ( wchar_t *  str)
staticnoexcept

Converts wchar_t* to std::u16string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
wchar_t* c1 = L"Gammasoft";
u16string s1 = string_converter::to_u16string(c1);

◆ to_u32string() [1/16]

static std::u32string xtd::convert_string::to_u32string ( char *  str)
staticnoexcept

Converts char* to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char* c1 = "Gammasoft";
u32string s1 = string_converter::to_u32string(c1);

◆ to_u32string() [2/16]

static std::u32string xtd::convert_string::to_u32string ( char16_t *  str)
staticnoexcept

Converts char16_t* to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char16_t* c1 = u"Gammasoft";
u32string s1 = string_converter::to_u32string(c1);

◆ to_u32string() [3/16]

static std::u32string xtd::convert_string::to_u32string ( char32_t *  str)
staticnoexcept

Converts char32_t* to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char32_t* c1 = U"Gammasoft";
u32string s1 = string_converter::to_u32string(c1);

◆ to_u32string() [4/16]

static std::u32string xtd::convert_string::to_u32string ( char8_t *  str)
staticnoexcept

Converts char8_t* to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char8_t* c1 = u8"Gammasoft";
u32string s1 = string_converter::to_u32string(c1);

◆ to_u32string() [5/16]

static std::u32string xtd::convert_string::to_u32string ( const char *  str)
staticnoexcept

Converts const char* to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char* c1 = "Gammasoft";
u32string s1 = string_converter::to_u32string(c1);

◆ to_u32string() [6/16]

static std::u32string xtd::convert_string::to_u32string ( const char16_t *  str)
staticnoexcept

Converts const char16_t* to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char16_t* c1 = u"Gammasoft";
u32string s1 = string_converter::to_u32string(c1);

◆ to_u32string() [7/16]

static std::u32string xtd::convert_string::to_u32string ( const char32_t *  str)
staticnoexcept

Converts const char32_t* to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char32_t* c1 = U"Gammasoft";
u32string s1 = string_converter::to_u32string(c1);

◆ to_u32string() [8/16]

static std::u32string xtd::convert_string::to_u32string ( const char8_t *  str)
staticnoexcept

Converts const char8_t* to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char8_t* c1 = u8"Gammasoft";
u32string s1 = string_converter::to_u32string(c1);

◆ to_u32string() [9/16]

static std::u32string xtd::convert_string::to_u32string ( const std::string &  str)
staticnoexcept

Converts std::string to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
string s1 = "Gammasoft";
u32string s2 = string_converter::to_u32string(s1);

◆ to_u32string() [10/16]

static std::u32string xtd::convert_string::to_u32string ( const std::u16string &  str)
staticnoexcept

Converts std::u16string to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u16string s1 = u"Gammasoft";
u32string s2 = string_converter::to_u32string(s1);

◆ to_u32string() [11/16]

static const std::u32string & xtd::convert_string::to_u32string ( const std::u32string &  str)
staticnoexcept

Converts std::u32string to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u32string s1 = U"Gammasoft";
u32string s2 = string_converter::to_u32string(s1);

◆ to_u32string() [12/16]

static std::u32string xtd::convert_string::to_u32string ( const std::u8string &  str)
staticnoexcept

Converts std::u8string to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u8string s1 = u8"Gammasoft";
u32string s2 = string_converter::to_u32string(s1);

◆ to_u32string() [13/16]

static std::u32string xtd::convert_string::to_u32string ( const std::wstring &  str)
staticnoexcept

Converts std::wstring to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
wstring s1 = L"Gammasoft";
u32string s2 = string_converter::to_u32string(s1);

◆ to_u32string() [14/16]

static std::u32string xtd::convert_string::to_u32string ( const wchar_t *  str)
staticnoexcept

Converts const wchar_t* to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const wchar_t* c1 = L"Gammasoft";
u32string s1 = string_converter::to_u32string(c1);

◆ to_u32string() [15/16]

static std::u32string xtd::convert_string::to_u32string ( const xtd::ustring str)
staticnoexcept

Converts xtd::ustring to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
ustring s1 = "Gammasoft";
u32string s2 = string_converter::to_u32string(s1);

◆ to_u32string() [16/16]

static std::u32string xtd::convert_string::to_u32string ( wchar_t *  str)
staticnoexcept

Converts wchar_t* to std::u32string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
wchar_t* c1 = L"Gammasoft";
u32string s1 = string_converter::to_u32string(c1);

◆ to_u8string() [1/16]

static std::u8string xtd::convert_string::to_u8string ( char *  str)
staticnoexcept

Converts char* to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char* c1 = "Gammasoft";
u8string s1 = string_converter::to_u8string(c1);

◆ to_u8string() [2/16]

static std::u8string xtd::convert_string::to_u8string ( char16_t *  str)
staticnoexcept

Converts char16_t* to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char16_t* c1 = u"Gammasoft";
u8string s1 = string_converter::to_u8string(c1);

◆ to_u8string() [3/16]

static std::u8string xtd::convert_string::to_u8string ( char32_t *  str)
staticnoexcept

Converts char32_t* to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char32_t* c1 = U"Gammasoft";
u8string s1 = string_converter::to_u8string(c1);

◆ to_u8string() [4/16]

static std::u8string xtd::convert_string::to_u8string ( char8_t *  str)
staticnoexcept

Converts char8_t* to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.

◆ to_u8string() [5/16]

static std::u8string xtd::convert_string::to_u8string ( const char *  str)
staticnoexcept

Converts const char* to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char* c1 = "Gammasoft";
u8string s1 = string_converter::to_u8string(c1);

◆ to_u8string() [6/16]

static std::u8string xtd::convert_string::to_u8string ( const char16_t *  str)
staticnoexcept

Converts const char16_t* to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char16_t* c1 = u"Gammasoft";
u8string s1 = string_converter::to_u8string(c1);

◆ to_u8string() [7/16]

static std::u8string xtd::convert_string::to_u8string ( const char32_t *  str)
staticnoexcept

Converts const char32_t* to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char32_t* c1 = U"Gammasoft";
u8string s1 = string_converter::to_u8string(c1);

◆ to_u8string() [8/16]

static std::u8string xtd::convert_string::to_u8string ( const char8_t *  str)
staticnoexcept

Converts const char8_t* to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char8_t* c1 = u8"Gammasoft";
u8string s1 = string_converter::to_u8string(c1);

◆ to_u8string() [9/16]

static std::u8string xtd::convert_string::to_u8string ( const std::string &  str)
staticnoexcept

Converts std::string to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
string s1 = "Gammasoft";
u8string s2 = string_converter::to_u8string(s1);

◆ to_u8string() [10/16]

static std::u8string xtd::convert_string::to_u8string ( const std::u16string &  str)
staticnoexcept

Converts std::u16string to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u16string s1 = u"Gammasoft";
u8string s2 = string_converter::to_u8string(s1);

◆ to_u8string() [11/16]

static std::u8string xtd::convert_string::to_u8string ( const std::u32string &  str)
staticnoexcept

Converts std::u32string to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u32string s1 = U"Gammasoft";
u8string s2 = string_converter::to_8ustring(s1);

◆ to_u8string() [12/16]

static const std::u8string & xtd::convert_string::to_u8string ( const std::u8string &  str)
staticnoexcept

Converts std::u8string to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u8string s1 = u8"Gammasoft";
u8string s2 = string_converter::to_u8string(s1);

◆ to_u8string() [13/16]

static std::u8string xtd::convert_string::to_u8string ( const std::wstring &  str)
staticnoexcept

Converts std::wstring to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
wstring s1 = L"Gammasoft";
u8string s2 = string_converter::to_u8string(s1);

◆ to_u8string() [14/16]

static std::u8string xtd::convert_string::to_u8string ( const wchar_t *  str)
staticnoexcept

Converts const wchar_t* to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const wchar_t* c1 = L"Gammasoft";
u8string s1 = string_converter::to_u8string(c1);

◆ to_u8string() [15/16]

static std::u8string xtd::convert_string::to_u8string ( const xtd::ustring str)
staticnoexcept

Converts xtd::ustring to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
ustring s1 = "Gammasoft";
u8string s2 = string_converter::to_u8string(s1);

◆ to_u8string() [16/16]

static std::u8string xtd::convert_string::to_u8string ( wchar_t *  str)
staticnoexcept

Converts wchar_t* to std::u8string.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
wchar_t* c1 = L"Gammasoft";
u8string s1 = string_converter::to_u8string(c1);

◆ to_ustring() [1/16]

static xtd::ustring xtd::convert_string::to_ustring ( char *  str)
staticnoexcept

Converts char* to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
char* c1 = "Gammasoft";
ustring s1 = string_converter::to_ustring(c1);

◆ to_ustring() [2/16]

static xtd::ustring xtd::convert_string::to_ustring ( char16_t *  str)
staticnoexcept

Converts char16_t* to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char16_t* c1 = u"Gammasoft";
ustring s1 = string_converter::to_ustring(c1);

◆ to_ustring() [3/16]

static xtd::ustring xtd::convert_string::to_ustring ( char32_t *  str)
staticnoexcept

Converts char32_t* to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char32_t* c1 = U"Gammasoft";
ustring s1 = string_converter::to_ustring(c1);

◆ to_ustring() [4/16]

static xtd::ustring xtd::convert_string::to_ustring ( char8_t *  str)
staticnoexcept

Converts char8_t* to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
char8_t* c1 = u8"Gammasoft";
ustring s1 = string_converter::to_ustring(c1);

◆ to_ustring() [5/16]

static xtd::ustring xtd::convert_string::to_ustring ( const char *  str)
staticnoexcept

Converts const char* to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
const char* c1 = "Gammasoft";
ustring s1 = string_converter::to_ustring(c1);

◆ to_ustring() [6/16]

static xtd::ustring xtd::convert_string::to_ustring ( const char16_t *  str)
staticnoexcept

Converts const char16_t* to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
const char16_t* c1 = u"Gammasoft";
ustring s1 = string_converter::to_ustring(c1);

◆ to_ustring() [7/16]

static xtd::ustring xtd::convert_string::to_ustring ( const char32_t *  str)
staticnoexcept

Converts const char32_t* to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char32_t* c1 = U"Gammasoft";
ustring s1 = string_converter::to_ustring(c1);

◆ to_ustring() [8/16]

static xtd::ustring xtd::convert_string::to_ustring ( const char8_t *  str)
staticnoexcept

Converts const char8_t* to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
const char8_t* c1 = u8"Gammasoft";
ustring s1 = string_converter::to_ustring(c1);

◆ to_ustring() [9/16]

static xtd::ustring xtd::convert_string::to_ustring ( const std::string &  str)
staticnoexcept

Converts std::string to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
string s1 = "Gammasoft";
ustring s2 = string_converter::to_ustring(s1);

◆ to_ustring() [10/16]

static xtd::ustring xtd::convert_string::to_ustring ( const std::u16string &  str)
staticnoexcept

Converts std::u16string to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u16string s1 = u"Gammasoft";
ustring s2 = string_converter::to_ustring(s1);

◆ to_ustring() [11/16]

static xtd::ustring xtd::convert_string::to_ustring ( const std::u32string &  str)
staticnoexcept

Converts std::u32string to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u32string s1 = U"Gammasoft";
ustring s2 = string_converter::to_ustring(s1);

◆ to_ustring() [12/16]

static xtd::ustring xtd::convert_string::to_ustring ( const std::u8string &  str)
staticnoexcept

Converts std::u8string to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u8string s1 = u8"Gammasoft";
ustring s2 = string_converter::to_ustring(s1);

◆ to_ustring() [13/16]

static xtd::ustring xtd::convert_string::to_ustring ( const std::wstring &  str)
staticnoexcept

Converts std::wstring to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
wstring s1 = L"Gammasoft";
ustring s2 = string_converter::to_ustring(s1);

◆ to_ustring() [14/16]

static xtd::ustring xtd::convert_string::to_ustring ( const wchar_t *  str)
staticnoexcept

Converts const wchar_t* to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const wchar_t* c1 = L"Gammasoft";
ustring s1 = string_converter::to_ustring(c1);

◆ to_ustring() [15/16]

static const xtd::ustring & xtd::convert_string::to_ustring ( const xtd::ustring str)
staticnoexcept

Converts xtd::ustring to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
ustring s1 = "Gammasoft";
ustring s2 = string_converter::to_ustring(s1);

◆ to_ustring() [16/16]

static xtd::ustring xtd::convert_string::to_ustring ( wchar_t *  str)
staticnoexcept

Converts wchar_t* to xtd::ustring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
wchar_t* c1 = L"Gammasoft";
ustring s1 = string_converter::to_ustring(c1);

◆ to_wstring() [1/16]

static std::wstring xtd::convert_string::to_wstring ( char *  str)
staticnoexcept

Converts char* to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char* c1 = "Gammasoft";
wstring s1 = string_converter::to_wstring(c1);

◆ to_wstring() [2/16]

static std::wstring xtd::convert_string::to_wstring ( char16_t *  str)
staticnoexcept

Converts char16_t* to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char16_t* c1 = u"Gammasoft";
wstring s1 = string_converter::to_wstring(c1);

◆ to_wstring() [3/16]

static std::wstring xtd::convert_string::to_wstring ( char32_t *  str)
staticnoexcept

Converts char32_t* to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char32_t* c1 = U"Gammasoft";
wstring s1 = string_converter::to_wstring(c1);

◆ to_wstring() [4/16]

static std::wstring xtd::convert_string::to_wstring ( char8_t *  str)
staticnoexcept

Converts char8_t* to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
char8_t* c1 = u8"Gammasoft";
wstring s1 = string_converter::to_wstring(c1);

◆ to_wstring() [5/16]

static std::wstring xtd::convert_string::to_wstring ( const char *  str)
staticnoexcept

Converts const char* to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char* c1 = "Gammasoft";
wstring s1 = string_converter::to_wstring(c1);

◆ to_wstring() [6/16]

static std::wstring xtd::convert_string::to_wstring ( const char16_t *  str)
staticnoexcept

Converts const char16_t* to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char16_t* c1 = u"Gammasoft";
wstring s1 = string_converter::to_wstring(c1);

◆ to_wstring() [7/16]

static std::wstring xtd::convert_string::to_wstring ( const char32_t *  str)
staticnoexcept

Converts const char32_t* to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char32_t* c1 = U"Gammasoft";
wstring s1 = string_converter::to_wstring(c1);

◆ to_wstring() [8/16]

static std::wstring xtd::convert_string::to_wstring ( const char8_t *  str)
staticnoexcept

Converts const char8_t* to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const char8_t* c1 = u8"Gammasoft";
wstring s1 = string_converter::to_wstring(c1);

◆ to_wstring() [9/16]

static std::wstring xtd::convert_string::to_wstring ( const std::string &  str)
staticnoexcept

Converts std::string to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
string s1 = "Gammasoft";
wstring s2 = string_converter::to_wstring(s1);

◆ to_wstring() [10/16]

static std::wstring xtd::convert_string::to_wstring ( const std::u16string &  str)
staticnoexcept

Converts std::u16string to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u16string s1 = u"Gammasoft";
wstring s2 = string_converter::to_wstring(s1);

◆ to_wstring() [11/16]

static std::wstring xtd::convert_string::to_wstring ( const std::u32string &  str)
staticnoexcept

Converts std::u32string to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u32string s1 = U"Gammasoft";
wstring s2 = string_converter::to_wstring(s1);

◆ to_wstring() [12/16]

static std::wstring xtd::convert_string::to_wstring ( const std::u8string &  str)
staticnoexcept

Converts std::u8string to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
u8string s1 = u8"Gammasoft";
wstring s2 = string_converter::to_wstring(s1);

◆ to_wstring() [13/16]

static const std::wstring & xtd::convert_string::to_wstring ( const std::wstring &  str)
staticnoexcept

Converts std::wstring to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
wstring s1 = L"Gammasoft";
wstring s2 = string_converter::to_wstring(s1);

◆ to_wstring() [14/16]

static std::wstring xtd::convert_string::to_wstring ( const wchar_t *  str)
staticnoexcept

Converts const wchar_t* to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
const wchar_t* c1 = L"Gammasoft";
wstring s1 = string_converter::to_wstring(c1);

◆ to_wstring() [15/16]

static std::wstring xtd::convert_string::to_wstring ( const xtd::ustring str)
staticnoexcept

Converts xtd::ustring to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
Examples
ustring s1 = "Gammasoft";
wstring s2 = string_converter::to_wstring(s1);

◆ to_wstring() [16/16]

static std::wstring xtd::convert_string::to_wstring ( wchar_t *  str)
staticnoexcept

Converts wchar_t* to std::wstring.

Parameters
strstring to convert.
Returns
The converted string.
Remarks
This method is used to convert string container to another.
Warning
The content of the string must be encoded in UTF-8 (65001) format. Make sure it is, otherwise the result will be uncertain.
wchar_t* c1 = L"Gammasoft";
wstring s1 = string_converter::to_wstring(c1);

The documentation for this class was generated from the following file: