String()

Contents
[ ]

String::String() constructor

Default constructor. Creates string object which is considered null.

System::String::String()

String::String(T&, typename std::enable_if<IsStringLiteral<T, char16_t>::value>::type *) constructor

Constructs string based on string literal. Considers literal a null-terminated string, calculates target string length based on literal size.

template<typename T> System::String::String(T &value, typename std::enable_if<IsStringLiteral<T, char16_t>::value>::type *=nullptr)

Arguments

ParameterTypeDescription
valueT&String literal pointer.

String::String(const T&, typename std::enable_if<IsStringPointer<T, char16_t>::value>::type *) constructor

Constructs string based on character string pointer. Treats pointed string as null-terminated, calculates target string length based on null character.

template<typename T> System::String::String(const T &value, typename std::enable_if<IsStringPointer<T, char16_t>::value>::type *=nullptr)

Arguments

ParameterTypeDescription
valueconst T&Character string pointer.

String::String(T&, typename std::enable_if<IsStringLiteral<T, char>::value>::type *) constructor

Constructs string based on string literal. Considers literal a null-terminated string in UTF8, calculates target string length based on literal size.

template<typename T> System::String::String(T &value, typename std::enable_if<IsStringLiteral<T, char>::value>::type *=nullptr)

Arguments

ParameterTypeDescription
valueT&String literal pointer.

String::String(const T&, typename std::enable_if<IsStringPointer<T, char>::value>::type *) constructor

Constructs string based on character string pointer. Treats pointed string as null-terminated in UTF8, calculates target string length based on null character.

template<typename T> System::String::String(const T &value, typename std::enable_if<IsStringPointer<T, char>::value>::type *=nullptr)

Arguments

ParameterTypeDescription
valueconst T&Character string pointer.

String::String(const char16_t *, int) constructor

Constructs string from character string pointer and explicit length.

System::String::String(const char16_t *str, int length)

Arguments

ParameterTypeDescription
strconst char16_t *String pointer, may be literal or array.
lengthintExplicit string length

String::String(const char *, int) constructor

Constructs string from character string pointer and explicit length.

System::String::String(const char *str, int length)

Arguments

ParameterTypeDescription
strconst char *String pointer to the UTF8 data, may be literal or array.
lengthintExplicit string length

String::String(const char16_t *, int, int) constructor

Constructs string from character string pointer from starting position using length.

System::String::String(const char16_t *str, int start, int length)

Arguments

ParameterTypeDescription
strconst char16_t *String pointer, may be literal or array.
startintStarting position.
lengthintString length.

String::String(const char16_t, int) constructor

Fill constructor.

System::String::String(const char16_t ch, int count)

Arguments

ParameterTypeDescription
chconst char16_tFill character.
countintTarget length.

String::String(const T&, typename std::enable_if<std::is_same<T, std::nullptr_t>::value>::type *) constructor

Nullptr constructor. Declared as template to resolve priorities with other template constructors.

template<typename T> System::String::String(const T &value, typename std::enable_if<std::is_same<T, std::nullptr_t>::value>::type *=nullptr)

Template parameters

ParameterDescription
TShould be nullptr_t

Arguments

ParameterTypeDescription
valueconst T&nullptr

String::String(T&, typename std::enable_if<IsStringLiteral<T, wchar_t>::value>::type *) constructor

Constructs string based on widestring literal. Considers literal a null-terminated string, calculates target string length based on literal size. Conversion from wchar_t is time-consuming on some platforms, so no implicit conversions are allowed.

template<typename T> System::String::String(T &value, typename std::enable_if<IsStringLiteral<T, wchar_t>::value>::type *=nullptr)

Arguments

ParameterTypeDescription
valueT&String literal pointer.

String::String(const T&, typename std::enable_if<IsStringPointer<T, wchar_t>::value>::type *) constructor

Constructs string based on widecharacter string pointer. Treats pointed string as null-terminated, calculates target string length based on null character. Conversion from wchar_t is time-consuming on some platforms, so no implicit conversions are allowed.

template<typename T> System::String::String(const T &value, typename std::enable_if<IsStringPointer<T, wchar_t>::value>::type *=nullptr)

Arguments

ParameterTypeDescription
valueconst T&Character string pointer.

String::String(const wchar_t *, int) constructor

Constructs string from widecharacter string pointer and explicit length. Conversion from wchar_t is time-consuming on some platforms, so no implicit conversions are allowed.

System::String::String(const wchar_t *str, int length)

Arguments

ParameterTypeDescription
strconst wchar_t *String pointer, may be literal or array.
lengthintExplicit string length

String::String(const wchar_t, int) constructor

Fill constructor. Conversion from wchar_t is time-consuming on some platforms, so no implicit conversions are allowed.

System::String::String(const wchar_t ch, int count=1)

Arguments

ParameterTypeDescription
chconst wchar_tFill character.
countintTarget length.

String::String(const String&) constructor

Copy constructor.

System::String::String(const String &str)

Arguments

ParameterTypeDescription
strconst String&String to copy.

String::String(String&&) constructor

Move constructor.

System::String::String(String &&str) noexcept

Arguments

ParameterTypeDescription
strString&&String to move data from.

String::String(const ArrayPtr<char16_t>&) constructor

Converts whole character array to string.

System::String::String(const ArrayPtr<char16_t> &arr)

Arguments

ParameterTypeDescription
arrconst ArrayPtr<char16_t>&Array to convert to string.

String::String(const ArrayPtr<char16_t>&, int, int) constructor

Converts character array subrange to string. If parameters are out of array bounds, empty string is constructed.

System::String::String(const ArrayPtr<char16_t> &arr, int offset, int len)

Arguments

ParameterTypeDescription
arrconst ArrayPtr<char16_t>&Character array.
offsetintSubarray start index.
lenintSubarray length.

String::String(const codeporting_icu::UnicodeString&) constructor

Wraps UnicodeString into String.

System::String::String(const codeporting_icu::UnicodeString &str)

Arguments

ParameterTypeDescription
strconst codeporting_icu::UnicodeString&UnicodeString to wrap into String.

String::String(codeporting_icu::UnicodeString&&) constructor

Move constructor.

System::String::String(codeporting_icu::UnicodeString &&str) noexcept

Arguments

ParameterTypeDescription
strcodeporting_icu::UnicodeString&&UnicodeString to wrap into String.

String::String(const std::wstring&) constructor

Creates String from widestring.

System::String::String(const std::wstring &str)

Arguments

ParameterTypeDescription
strconst std::wstring&Widestring to convert into String.

String::String(const std::u16string&) constructor

Creates String from utf16 string.

System::String::String(const std::u16string &str)

Arguments

ParameterTypeDescription
strconst std::u16string&Utf16 string to convert into String.

String::String(const std::string&) constructor

Creates String from std::string string presented in format UTF-8.

System::String::String(const std::string &utf8str)

Arguments

ParameterTypeDescription
utf8strconst std::string&std::string string to convert into String.

String::String(const std::u32string&) constructor

Creates String from std::u32string string.

System::String::String(const std::u32string &u32str)

Arguments

ParameterTypeDescription
u32strconst std::u32string&std::u32string string to convert into String.

See Also