xtd 0.2.0
Loading...
Searching...
No Matches

◆ string

using xtd::string = typedef xtd::ustring

Represents text as a sequence of UTF-8 code units.

Namespace
xtd
Library
xtd.core
Remarks
A string is a sequential collection of characters that's used to represent text. A xtd::ustring object is a sequential collection of char that represent a string; a char corresponds to a UTF-8 code unit. The value of the xtd::ustring object is the content of the sequential collection of char, and unlike std::basic_string<char> that value is immutable (that is, it is read-only).
If you want the same mutable string class, you can use xtd::text::ustring_builder class.
xtd::ustring is inherited from std::basic_string<char> and therefore offers the full (immutable) API of std::string.
xtd::ustring cannot inherit from xtd::iequatable <xtd::ustring> because std::basic_string<char> defines the == and != operators.
Todo:
replace all class::ustring; definitions by class xtd::string; when switching class xtd::ustring an alias xtd::string to class xtd::string and alias xtd::ustring
Deprecated:
Replaced by xtd::string - Will be removed in version 0.4.0