Represents text as a sequence of character units.
char_t
, and unlike std::basic_string<char_t> that value is immutable (that is, it is read-only). char_t
, and unlike std::basic_string<char_t> that value is immutable (that is, it is read-only). Public Aliases | |
using | base_type = std::basic_string< char_t, traits_t, allocator_t > |
Represents the basic string base type. | |
using | traits_type = typename base_type::traits_type |
Represents the basic string traits type. | |
using | value_type = typename base_type::value_type |
Represents the basic string value type. | |
using | allocator_type = typename base_type::allocator_type |
Represents the basic string allocator type. | |
using | size_type = typename base_type::size_type |
Represents the basic string size type. | |
using | difference_type = typename base_type::difference_type |
Represents the basic string difference type. | |
using | reference = typename base_type::reference |
Represents the basic string referecne type. | |
using | const_reference = typename base_type::const_reference |
Represents the basic string const referecne type. | |
using | pointer = typename base_type::pointer |
Represents the basic string pointer type. | |
using | const_pointer = typename base_type::const_pointer |
Represents the basic string const pointer type. | |
using | iterator = typename xtd::collections::generic::ienumerable< char_t >::iterator |
Represents the basic string iterator type. | |
using | const_iterator = typename xtd::collections::generic::ienumerable< char_t >::const_iterator |
Represents the basic string const iterator type. | |
using | reverse_iterator = typename base_type::reverse_iterator |
Represents the basic string reverse iterator type. | |
using | const_reverse_iterator = typename base_type::const_reverse_iterator |
Represents the basic string const reverse iterator type. | |
using | enumerator_type = typename xtd::collections::generic::enumerator< value_type > |
Represents the basic string enumerator type. | |
Public Fields | |
static const basic_string | empty_string |
Represents the empty basic_string. | |
static constexpr size_type | npos |
This is a special value equal to the maximum value representable by the type xtd::size. | |
Public Operators | |
const_reference | operator[] (xtd::size index) const |
Returns a reference to the character at specified location index. | |
operator const base_type & () const noexcept | |
Returns a reference to the underlying base type. | |
basic_string & | operator= (const basic_string< char > &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str. | |
basic_string & | operator= (const basic_string< xtd::char16 > &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str. | |
basic_string & | operator= (const basic_string< xtd::char32 > &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str. | |
basic_string & | operator= (const basic_string< xtd::char8 > &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str. | |
basic_string & | operator= (const basic_string< xtd::wchar > &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str. | |
basic_string & | operator= (basic_string< char > &&str) noexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in str is moved from str into this string). str is in a valid but unspecified state afterwards. | |
basic_string & | operator= (basic_string< xtd::char16 > &&str) noexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in str is moved from str into this string). str is in a valid but unspecified state afterwards. | |
basic_string & | operator= (basic_string< xtd::char32 > &&str) noexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in str is moved from str into this string). str is in a valid but unspecified state afterwards. | |
basic_string & | operator= (basic_string< xtd::char8 > &&str) noexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in str is moved from str into this string). str is in a valid but unspecified state afterwards. | |
basic_string & | operator= (basic_string< xtd::wchar > &&str) noexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in str is moved from str into this string). str is in a valid but unspecified state afterwards. | |
basic_string & | operator= (const std::basic_string< char > &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (const std::basic_string< xtd::char16 > &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (const std::basic_string< xtd::char32 > &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (const std::basic_string< xtd::char8 > &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (const std::basic_string< xtd::wchar > &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (std::basic_string< char > &&str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (std::basic_string< xtd::char16 > &&str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (std::basic_string< xtd::char32 > &&str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (std::basic_string< xtd::char8 > &&str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (std::basic_string< xtd::wchar > &&str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (const char *str) |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (const xtd::char16 *str) |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (const xtd::char32 *str) |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (const xtd::char8 *str) |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (const xtd::wchar *str) |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string & | operator= (char character) |
Copy assignment operator. Replaces the contents with the specified character. | |
basic_string & | operator= (xtd::char16 character) |
Copy assignment operator. Replaces the contents with the specified character. | |
basic_string & | operator= (xtd::char32 character) |
Copy assignment operator. Replaces the contents with the specified character. | |
basic_string & | operator= (xtd::char8 character) |
Copy assignment operator. Replaces the contents with the specified character. | |
basic_string & | operator= (xtd::wchar character) |
Copy assignment operator. Replaces the contents with the specified character. | |
basic_string & | operator= (const std::initializer_list< char > &il) |
Copy assignment operator. Replaces the contents with a copy of the contents of the specified initializer list. | |
basic_string & | operator= (const std::initializer_list< xtd::char16 > &il) |
Copy assignment operator. Replaces the contents with a copy of the contents of the specified initializer list. | |
basic_string & | operator= (const std::initializer_list< xtd::char32 > &il) |
Copy assignment operator. Replaces the contents with a copy of the contents of the specified initializer list. | |
basic_string & | operator= (const std::initializer_list< xtd::char8 > &il) |
Copy assignment operator. Replaces the contents with a copy of the contents of the specified initializer list. | |
basic_string & | operator= (const std::initializer_list< xtd::wchar > &il) |
Copy assignment operator. Replaces the contents with a copy of the contents of the specified initializer list. | |
basic_string & | operator+= (const basic_string< char > &str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const basic_string< xtd::char16 > &str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const basic_string< xtd::char32 > &str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const basic_string< xtd::char8 > &str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const basic_string< xtd::wchar > &str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (basic_string< char > &&str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (basic_string< xtd::char16 > &&str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (basic_string< xtd::char32 > &&str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (basic_string< xtd::char8 > &&str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (basic_string< xtd::wchar > &&str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const std::basic_string< char > &str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const std::basic_string< xtd::char16 > &str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const std::basic_string< xtd::char32 > &str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const std::basic_string< xtd::char8 > &str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const std::basic_string< xtd::wchar > &str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const char *str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const xtd::char16 *str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const xtd::char32 *str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const xtd::char8 *str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (const xtd::wchar *str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (char ch) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (xtd::char16 ch) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (xtd::char32 ch) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (xtd::char8 ch) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string & | operator+= (xtd::wchar ch) |
Addition assignment operator. Appends additional characters to the string. | |
Public Constructors | |
basic_string ()=default | |
Initializes a new instance of xtd::basic_string. | |
basic_string (const allocator_type &allocator) noexcept | |
Initializes a new instance of xtd::basic_string with specified allocator. | |
basic_string (const basic_string< char > &str) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const basic_string< xtd::char16 > &str) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const basic_string< xtd::char32 > &str) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const basic_string< xtd::char8 > &str) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const basic_string< xtd::wchar > &str) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const basic_string< char > &str, const allocator_type &allocator) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator. | |
basic_string (const basic_string< xtd::char16 > &str, const allocator_type &allocator) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator. | |
basic_string (const basic_string< xtd::char32 > &str, const allocator_type &allocator) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator. | |
basic_string (const basic_string< xtd::char8 > &str, const allocator_type &allocator) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator. | |
basic_string (const basic_string< xtd::wchar > &str, const allocator_type &allocator) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator. | |
basic_string (const basic_string< char > &str, xtd::size index) | |
Initializes a new instance of xtd::basic_string with specified substring at index. | |
basic_string (const basic_string< xtd::char16 > &str, xtd::size index) | |
Initializes a new instance of xtd::basic_string with specified substring at index. | |
basic_string (const basic_string< xtd::char32 > &str, xtd::size index) | |
Initializes a new instance of xtd::basic_string with specified substring at index. | |
basic_string (const basic_string< xtd::char8 > &str, xtd::size index) | |
Initializes a new instance of xtd::basic_string with specified substring at index. | |
basic_string (const basic_string< xtd::wchar > &str, xtd::size index) | |
Initializes a new instance of xtd::basic_string with specified substring at index. | |
basic_string (const basic_string< char > &str, xtd::size index, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring at index and allocator. | |
basic_string (const basic_string< xtd::char16 > &str, xtd::size index, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring at index and allocator. | |
basic_string (const basic_string< xtd::char32 > &str, xtd::size index, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring at index and allocator. | |
basic_string (const basic_string< xtd::char8 > &str, xtd::size index, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring at index and allocator. | |
basic_string (const basic_string< xtd::wchar > &str, xtd::size index, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring at index and allocator. | |
basic_string (const basic_string< char > &str, xtd::size index, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified substring at index and count characters. | |
basic_string (const basic_string< xtd::char16 > &str, xtd::size index, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified substring at index and count characters. | |
basic_string (const basic_string< xtd::char32 > &str, xtd::size index, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified substring at index and count characters. | |
basic_string (const basic_string< xtd::char8 > &str, xtd::size index, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified substring at index and count characters. | |
basic_string (const basic_string< xtd::wchar > &str, xtd::size index, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified substring at index and count characters. | |
basic_string (const basic_string< char > &str, xtd::size index, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring at index, count characters and allocator. | |
basic_string (const basic_string< xtd::char16 > &str, xtd::size index, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring at index, count characters and allocator. | |
basic_string (const basic_string< xtd::char32 > &str, xtd::size index, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring at index, count characters and allocator. | |
basic_string (const basic_string< xtd::char8 > &str, xtd::size index, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring at index, count characters and allocator. | |
basic_string (const basic_string< xtd::wchar > &str, xtd::size index, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring at index, count characters and allocator. | |
basic_string (basic_string &&)=default | |
Initializes a new instance of xtd::basic_string with specified string to move. | |
basic_string (basic_string &&str, const allocator_type &allocator) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to move and allocator. | |
basic_string (xtd::size count, char character) | |
Initializes a new instance of xtd::basic_string with specified count copies of character. | |
basic_string (xtd::size count, char character, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator. | |
basic_string (xtd::size count, xtd::char16 character) | |
Initializes a new instance of xtd::basic_string with specified count copies of character. | |
basic_string (xtd::size count, xtd::char16 character, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator. | |
basic_string (xtd::size count, xtd::char32 character) | |
Initializes a new instance of xtd::basic_string with specified count copies of character. | |
basic_string (xtd::size count, xtd::char32 character, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator. | |
basic_string (xtd::size count, xtd::char8 character) | |
Initializes a new instance of xtd::basic_string with specified count copies of character. | |
basic_string (xtd::size count, xtd::char8 character, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator. | |
basic_string (xtd::size count, xtd::wchar character) | |
Initializes a new instance of xtd::basic_string with specified count copies of character. | |
basic_string (xtd::size count, xtd::wchar character, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator. | |
basic_string (char character, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified count copies of character. | |
basic_string (char character, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator. | |
basic_string (xtd::char16 character, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified count copies of character. | |
basic_string (xtd::char16 character, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator. | |
basic_string (xtd::char32 character, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified count copies of character. | |
basic_string (xtd::char32 character, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator. | |
basic_string (xtd::char8 character, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified count copies of character. | |
basic_string (xtd::char8 character, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator. | |
basic_string (xtd::wchar character, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified count copies of character. | |
basic_string (xtd::wchar character, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator. | |
basic_string (const char *str) | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const xtd::char16 *str) | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const xtd::char32 *str) | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const xtd::char8 *str) | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const xtd::wchar *str) | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const char *str, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified string to copy, and allocator. | |
basic_string (const xtd::char16 *str, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified string to copy, and allocator. | |
basic_string (const xtd::char32 *str, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified string to copy, and allocator. | |
basic_string (const xtd::char8 *str, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified string to copy, and allocator. | |
basic_string (const xtd::wchar *str, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified string to copy, and allocator. | |
basic_string (const char *str, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified substring and count characters. | |
basic_string (const xtd::char16 *str, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified substring and count characters. | |
basic_string (const xtd::char32 *str, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified substring and count characters. | |
basic_string (const xtd::char8 *str, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified substring and count characters. | |
basic_string (const xtd::wchar *str, xtd::size count) | |
Initializes a new instance of xtd::basic_string with specified substring and count characters. | |
basic_string (const char *str, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring, count characters and allocator. | |
basic_string (const xtd::char16 *str, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring, count characters and allocator. | |
basic_string (const xtd::char32 *str, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring, count characters and allocator. | |
basic_string (const xtd::char8 *str, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring, count characters and allocator. | |
basic_string (const xtd::wchar *str, xtd::size count, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified substring, count characters and allocator. | |
basic_string (const std::basic_string< char > &str) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const std::basic_string< xtd::char16 > &str) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const std::basic_string< xtd::char32 > &str) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const std::basic_string< xtd::char8 > &str) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const std::basic_string< xtd::wchar > &str) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy. | |
basic_string (const std::basic_string< char > &str, const allocator_type &allocator) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator. | |
basic_string (const std::basic_string< xtd::char16 > &str, const allocator_type &allocator) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator. | |
basic_string (const std::basic_string< xtd::char32 > &str, const allocator_type &allocator) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator. | |
basic_string (const std::basic_string< xtd::char8 > &str, const allocator_type &allocator) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator. | |
basic_string (const std::basic_string< xtd::wchar > &str, const allocator_type &allocator) noexcept | |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator. | |
template<typename input_iterator_t > | |
basic_string (input_iterator_t first, input_iterator_t last) | |
Initializes a new instance of xtd::basic_string with specified first and last iterators of substring. | |
template<typename input_iterator_t > | |
basic_string (input_iterator_t first, input_iterator_t last, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified first and last iterators of substring and allocator. | |
template<typename string_view_like_t > | |
constexpr | basic_string (const string_view_like_t &string_view) |
Initializes a new instance of xtd::basic_string with specified string view of substring and allocator. | |
template<typename string_view_like_t > | |
constexpr | basic_string (const string_view_like_t &string_view, const allocator_type &allocator) |
Initializes a new instance of xtd::basic_string with specified string view of substring and allocator. | |
template<typename string_view_like_t > | |
constexpr | basic_string (const string_view_like_t &string_view, size_type index, size_type count) |
Initializes a new instance of xtd::basic_string with specified string view of substring and allocator. | |
template<typename string_view_like_t > | |
constexpr | basic_string (const string_view_like_t &string_view, size_type index, size_type count, const allocator_type &allocator) |
Initializes a new instance of xtd::basic_string with specified string view of substring and allocator. | |
basic_string (std::initializer_list< char > il) | |
Initializes a new instance of xtd::basic_string with specified initializer list. | |
basic_string (std::initializer_list< xtd::char16 > il) | |
Initializes a new instance of xtd::basic_string with specified initializer list. | |
basic_string (std::initializer_list< xtd::char32 > il) | |
Initializes a new instance of xtd::basic_string with specified initializer list. | |
basic_string (std::initializer_list< xtd::char8 > il) | |
Initializes a new instance of xtd::basic_string with specified initializer list. | |
basic_string (std::initializer_list< xtd::wchar > il) | |
Initializes a new instance of xtd::basic_string with specified initializer list. | |
basic_string (std::initializer_list< char > il, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified initializer list and allocator. | |
basic_string (std::initializer_list< xtd::char16 > il, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified initializer list and allocator. | |
basic_string (std::initializer_list< xtd::char32 > il, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified initializer list and allocator. | |
basic_string (std::initializer_list< xtd::char8 > il, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified initializer list and allocator. | |
basic_string (std::initializer_list< xtd::wchar > il, const allocator_type &allocator) | |
Initializes a new instance of xtd::basic_string with specified initializer list and allocator. | |
Public Properties | |
const_reference | back () const |
Returns reference to the last character in the string. | |
const_iterator | begin () const override |
Returns an iterator to the first character of the string. | |
const_pointer | c_str () const noexcept |
Returns a pointer to a null-terminated character array with data equivalent to those stored in the string. | |
size_type | capacity () const noexcept |
Returns the number of characters that the string has currently allocated space for. | |
const_iterator | cbegin () const override |
Returns an iterator to the first character of the string. | |
const_reverse_iterator | crbegin () const |
Returns a reverse iterator to the first character of the string. | |
const base_type & | chars () const noexcept |
Returns a reference to the underlying base type. | |
const_iterator | cend () const override |
Returns an iterator to the character following the last character of the string. This character acts as a placeholder, attempting to access it results in undefined behavior. | |
const_reverse_iterator | crend () const |
Returns a reverse iterator to the character following the last character of the string. This character acts as a placeholder, attempting to access it results in undefined behavior. | |
const_pointer | data () const noexcept |
Returns a pointer to the underlying array serving as character storage. The pointer is such that the range [data() , data() + size() ] is valid and the values in it correspond to the values stored in the string. | |
bool | empty () const noexcept |
Checks if the string has no characters, i.e. whether begin() == end() . | |
const_iterator | end () const override |
Returns an iterator to the character following the last character of the string. This character acts as a placeholder, attempting to access it results in undefined behavior. | |
const_reference | front () const |
Returns reference to the first character in the string. The behavior is undefined if empty() is true. | |
size_type | length () const noexcept |
Gets the number of characters in the current xtd::basic_string object. | |
size_type | max_size () const noexcept |
Returns the maximum number of elements the string is able to hold due to system or library implementation limitations, i.e. std::distance(begin(), end()) for the largest string. | |
const_reverse_iterator | rbegin () const |
Returns a reverse iterator to the first character of the string. | |
const_reverse_iterator | rend () const |
Returns a reverse iterator to the character following the last character of the string. This character acts as a placeholder, attempting to access it results in undefined behavior. | |
size_type | size () const noexcept |
Returns the number of char_t elements in the string, i.e. std::distance(begin(), end()) . | |
Public Methods | |
const_reference | at (size_type pos) const |
Returns a reference to the character at specified location pos . | |
int32 | compare (const basic_string &str) const |
Compares two character sequences. | |
int32 | compare (size_type pos1, size_type count1, const basic_string &str) const |
Compares two character sequences. | |
int32 | compare (size_type pos1, size_type count1, const basic_string &str, size_type pos2) const |
Compares two character sequences. | |
int32 | compare (size_type pos1, size_type count1, const basic_string &str, size_type pos2, size_type count2) const |
Compares two character sequences. | |
int32 | compare (const_pointer s) const |
Compares two character sequences. | |
int32 | compare (size_type pos1, size_type count1, const_pointer s) const |
Compares two character sequences. | |
int32 | compare (size_type pos1, size_type count1, const_pointer s, size_type count2) const |
Compares two character sequences. | |
int32 | compare_to (const object &value) const |
Compares this instance with a specified xtd::object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified xtd::object. | |
int32 | compare_to (const basic_string &value) const noexcept override |
Compares this instance with a specified xtd::basic_string object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified string. | |
virtual bool | contains (value_type value) const noexcept |
Returns a value indicating whether a specified char occurs within this basic_string. | |
virtual bool | contains (const basic_string &value) const noexcept |
Returns a value indicating whether a specified substring occurs within this basic_string. | |
bool | equals (const object &obj) const noexcept override |
Determines whether this instance and a specified object, which must also be a xtd::basic_string object, have the same value. | |
bool | equals (const basic_string &value) const noexcept override |
Determines whether this instance and another specified xtd::basic_string object have the same value. | |
bool | equals (const basic_string &value, bool ignore_case) const noexcept |
Determines whether this instance and another specified xtd::basic_string object have the same value, ignoring or honoring their case. | |
bool | ends_with (value_type value) const noexcept |
Determines whether the end of this basic_string matches the specified character. | |
bool | ends_with (value_type value, bool ignore_case) const noexcept |
Determines whether the end of this basic_string matches the specified character, ignoring or honoring their case. | |
bool | ends_with (const basic_string &value) const noexcept |
Determines whether the end of this basic_string matches the specified basic_string. | |
bool | ends_with (const basic_string &value, bool ignore_case) const noexcept |
Determines whether the end of this basic_string instance matches the specified basic_string, ignoring or honoring their case. | |
bool | ends_with (const basic_string &value, xtd::string_comparison comparison_type) const noexcept |
Determines whether the end of this basic_string matches the specified basic_string when compared using the specified comparison option. | |
size_type | find (const basic_string &str) const |
Finds the first substring equal to the given character sequence. Search begins at 0 , i.e. the found substring must not begin in a position preceding 0 . | |
size_type | find (const basic_string &str, size_type pos) const |
Finds the first substring equal to the given character sequence. Search begins at pos , i.e. the found substring must not begin in a position preceding pos . | |
size_type | find (const_pointer s, size_type pos, size_type count) const |
Finds the first substring equal to the given character sequence. Search begins at pos , i.e. the found substring must not begin in a position preceding pos . | |
size_type | find (const_pointer s) const |
Finds the first substring equal to the given character sequence. Search begins at 0 , i.e. the found substring must not begin in a position preceding 0 . | |
size_type | find (const_pointer s, size_type pos) const |
Finds the first substring equal to the given character sequence. Search begins at pos , i.e. the found substring must not begin in a position preceding pos . | |
size_type | find (value_type ch) const |
Finds the first substring equal to the given character sequence. Search begins at 0 , i.e. the found substring must not begin in a position preceding 0 . | |
size_type | find (value_type ch, size_type pos) const |
Finds the first substring equal to the given character sequence. Search begins at pos , i.e. the found substring must not begin in a position preceding pos . | |
size_type | find_first_of (const basic_string &str) const |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos , size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. @parzm str The string identifying characters to search for. | |
size_type | find_first_of (const basic_string &str, size_type pos) const |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos , size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. | |
size_type | find_first_of (const_pointer s, size_type pos, size_type count) const |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos , size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. | |
size_type | find_first_of (const_pointer s) const |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos , size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. | |
size_type | find_first_of (const_pointer s, size_type pos) const |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos , size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. | |
size_type | find_first_of (char_t ch) const |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos , size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. | |
size_type | find_first_of (char_t ch, size_type pos) const |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos , size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. | |
size_type | find_first_not_of (const basic_string &str) const |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos , size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned. @parzm str The string identifying characters to search for. | |
size_type | find_first_not_of (const basic_string &str, size_type pos) const |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos , size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned. | |
size_type | find_first_not_of (const_pointer s, size_type pos, size_type count) const |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos , size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned. | |
size_type | find_first_not_of (const_pointer s) const |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos , size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned. | |
size_type | find_first_not_of (const_pointer s, size_type pos) const |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos , size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned. | |
size_type | find_first_not_of (char_t ch) const |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos , size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned. | |
size_type | find_first_not_of (char_t ch, size_type pos) const |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos , size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned. | |
size_type | find_last_of (const basic_string &str) const |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0 , pos ]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. @parzm str The string identifying characters to search for. | |
size_type | find_last_of (const basic_string &str, size_type pos) const |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0 , pos ]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. | |
size_type | find_last_of (const_pointer s, size_type pos, size_type count) const |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0 , pos ]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. | |
size_type | find_last_of (const_pointer s) const |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0 , pos ]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. | |
size_type | find_last_of (const_pointer s, size_type pos) const |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0 , pos ]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. | |
size_type | find_last_of (char_t ch) const |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0 , pos ]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. | |
size_type | find_last_of (char_t ch, size_type pos) const |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0 , pos ]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. | |
size_type | find_last_not_of (const basic_string &str) const |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0 , pos ]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned. @parzm str The string identifying characters to search for. | |
size_type | find_last_not_of (const basic_string &str, size_type pos) const |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0 , pos ]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned. | |
size_type | find_last_not_of (const_pointer s, size_type pos, size_type count) const |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0 , pos ]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned. | |
size_type | find_last_not_of (const_pointer s) const |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0 , pos ]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned. | |
size_type | find_last_not_of (const_pointer s, size_type pos) const |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0 , pos ]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned. | |
size_type | find_last_not_of (char_t ch) const |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0 , pos ]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned. | |
size_type | find_last_not_of (char_t ch, size_type pos) const |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0 , pos ]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned. | |
allocator_type | get_allocator () const |
Returns the allocator associated with the string. | |
virtual const base_type & | get_base_type () const noexcept |
Returns the underlying base type. | |
xtd::size | get_hash_code () const noexcept override |
Returns the hash code for this basic_string. | |
enumerator_type | get_enumerator () const noexcept override |
Returns an enumerator that iterates through a collection. | |
xtd::size | index_of (const basic_string &value) const noexcept |
Reports the index of the first occurrence of the specified basic_string in this basic_string. | |
xtd::size | index_of (const basic_string &value, xtd::size start_index) const |
Reports the index of the first occurrence of the specified character in this basic_string. The search starts at a specified character position. | |
xtd::size | index_of (const basic_string &value, xtd::size start_index, xtd::size count) const |
Reports the index of the first occurrence of the specified character in this basic_string. The search starts at a specified character position and examines a specified number of character positions. | |
xtd::size | index_of (value_type value) const noexcept |
Reports the index of the first occurrence of the specified character in this basic_string. | |
xtd::size | index_of (value_type value, xtd::size start_index) const |
Reports the index of the first occurrence of the specified character in this basic_string. The search starts at a specified character position. | |
xtd::size | index_of (value_type value, xtd::size start_index, xtd::size count) const |
Reports the index of the first occurrence of the specified character in this basic_string. The search starts at a specified character position and examines a specified number of character positions. | |
xtd::size | index_of_any (const xtd::array< value_type > &values) const noexcept |
Reports the index of the first occurrence in this instance of any character in a specified array of characters. | |
xtd::size | index_of_any (const xtd::array< value_type > &values, xtd::size start_index) const |
Reports the index of the first occurrence in this instance of any character in a specified array of characters. The search starts at a specified character position. | |
xtd::size | index_of_any (const xtd::array< value_type > &values, xtd::size start_index, xtd::size count) const |
Reports the index of the first occurrence in this instance of any character in a specified array of characters. The search starts at a specified character position. | |
basic_string | insert (xtd::size start_index, const basic_string &value) const |
Inserts a specified instance of basic_string at a specified index position in this instance. | |
bool | is_empty () const noexcept |
Indicates whether this basic_string is an empty basic_string (""). | |
xtd::size | last_index_of (const basic_string &value) const noexcept |
Reports the index of the last occurrence of the specified basic_string in this basic_string. | |
xtd::size | last_index_of (const basic_string &value, xtd::size start_index) const |
Reports the index of the last occurrence of the specified character in this basic_string. The search starts at a specified character position. | |
xtd::size | last_index_of (const basic_string &value, xtd::size start_index, xtd::size count) const |
Reports the index of the last occurrence of the specified character in this basic_string. The search starts at a specified character position and examines a specified number of character positions. | |
xtd::size | last_index_of (value_type value) const noexcept |
Reports the index of the last occurrence of the specified character in this tring. | |
xtd::size | last_index_of (value_type value, xtd::size start_index) const |
Reports the index of the last occurrence of the specified character in this basic_string. The search starts at a specified character position. | |
xtd::size | last_index_of (value_type value, xtd::size start_index, xtd::size count) const |
Reports the index of the last occurrence of the specified character in this basic_string. The search starts at a specified character position and examines a specified number of character positions. | |
xtd::size | last_index_of_any (const xtd::array< value_type > &values) const noexcept |
Reports the index of the last occurrence in this instance of any character in a specified array of characters. | |
xtd::size | last_index_of_any (const xtd::array< value_type > &values, xtd::size start_index) const |
Reports the index of the last occurrence in this instance of any character in a specified array of characters. The search starts at a specified character position. | |
xtd::size | last_index_of_any (const xtd::array< value_type > &values, xtd::size start_index, xtd::size count) const |
Reports the index of the last occurrence in this instance of any character in a specified array of characters. The search starts at a specified character position. | |
basic_string | pad_left (xtd::size total_width) const noexcept |
Right-aligns the characters in this basic_string, padding with spaces on the left for a specified total length. | |
basic_string | pad_left (xtd::size total_width, char32 padding_char) const noexcept |
Right-aligns the characters in this basic_string, padding with spaces on the left for a specified total length. | |
basic_string | pad_right (xtd::size total_width) const noexcept |
Left-aligns the characters in this basic_string, padding with spaces on the right for a specified total length. | |
basic_string | pad_right (xtd::size total_width, char32 padding_char) const noexcept |
Left-aligns the characters in this basic_string, padding with spaces on the right for a specified total length. | |
basic_string | quoted () const |
Allows insertion and extraction of quoted strings, such as the ones found in CSV or XML. | |
basic_string | quoted (value_type delimiter) const |
Allows insertion and extraction of quoted strings, such as the ones found in CSV or XML ith specified delimiter. | |
basic_string | quoted (value_type delimiter, value_type escape) const |
Allows insertion and extraction of quoted strings, such as the ones found in CSV or XML ith specified delimiter and escape. | |
basic_string | remove (xtd::size start_index) const |
Deletes all the characters from this basic_string beginning at a specified position and continuing through the last position. | |
basic_string | remove (xtd::size start_index, xtd::size count) const |
Deletes all the characters from this basic_string beginning at a specified position and continuing through the last position. | |
basic_string | replace (value_type old_char, value_type new_char) const noexcept |
Replaces all occurrences of a specified char_t in this basic_string with another specified char_t. | |
basic_string | replace (const basic_string &old_string, const basic_string &new_string) const noexcept |
Replaces all occurrences of a specified basic_string in this basic_string with another specified basic_string. | |
size_type | rfind (const basic_string &str) const |
Finds the last substring that is equal to the given character sequence. The search begins at xtd::basic_string::nposand proceeds from right to left (thus, the found substring, if any, cannot begin in a position following xtd::basic_string::npos). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as xtd::basic_string::npos, the whole string will be searched. @return Position of the first character of the found substring or xtd::basic_string::npos if no such substring is found. @remarks Finds the first substring equal to str`. | |
size_type | rfind (const basic_string &str, size_type pos) const |
Finds the last substring that is equal to the given character sequence. The search begins at pos and proceeds from right to left (thus, the found substring, if any, cannot begin in a position following pos ). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as pos , the whole string will be searched. | |
size_type | rfind (const_pointer s, size_type pos, size_type count) const |
Finds the last substring that is equal to the given character sequence. The search begins at pos and proceeds from right to left (thus, the found substring, if any, cannot begin in a position following pos ). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as pos , the whole string will be searched. | |
size_type | rfind (const_pointer s) const |
Finds the last substring that is equal to the given character sequence. The search begins at xtd::basic_string::nposand proceeds from right to left (thus, the found substring, if any, cannot begin in a position following xtd::basic_string::npos). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as xtd::basic_string::npos, the whole string will be searched. @param s The pointer to a character string to search for. @return Position of the first character of the found substring or xtd::basic_string::npos if no such substring is found. @remarks Finds the first substring equal to the character string pointed to by s. The length of the string is determined by the first null character using traits_t::length(s). @remarks If [ s, s + traits_t::length(s)`) is not a valid range, the behavior is undefined. | |
size_type | rfind (const_pointer s, size_type pos) const |
Finds the last substring that is equal to the given character sequence. The search begins at pos and proceeds from right to left (thus, the found substring, if any, cannot begin in a position following pos ). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as pos , the whole string will be searched. | |
size_type | rfind (value_type ch) const |
Finds the last substring that is equal to the given character sequence. The search begins at xtd::basic_string::nposand proceeds from right to left (thus, the found substring, if any, cannot begin in a position following xtd::basic_string::npos). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as xtd::basic_string::npos, the whole string will be searched. @param ch The character to search for. @return Position of the first character of the found substring or xtd::basic_string::npos if no such substring is found. @remarks Finds the first character ch` (treated as a single-character substring by the formal rules below). | |
size_type | rfind (value_type ch, size_type pos) const |
Finds the last substring that is equal to the given character sequence. The search begins at pos and proceeds from right to left (thus, the found substring, if any, cannot begin in a position following pos ). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as pos , the whole string will be searched. | |
xtd::array< basic_string > | split () const noexcept |
Splits this basic_string into substrings that are based on the default white-space characters. White-space characters are defined by the c++ standard and return true if they are passed to the xtd::char_object::isspace() or std::iswspace() method. | |
xtd::array< basic_string > | split (value_type separator) const noexcept |
Splits this basic_string into substrings that are based on the characters in an array. | |
xtd::array< basic_string > | split (value_type separator, xtd::string_split_options options) const noexcept |
Splits this basic_string into substrings based on the characters in an array. You can specify whether the substrings include empty array elements. | |
xtd::array< basic_string > | split (value_type separator, xtd::size count) const noexcept |
Splits this basic_string into a maximum number of substrings based on the characters in an array. You also specify the maximum number of substrings to return. | |
xtd::array< basic_string > | split (value_type separator, xtd::size count, xtd::string_split_options options) const noexcept |
Splits this basic_string into a maximum number of substrings based on the characters in an array. | |
xtd::array< basic_string > | split (const xtd::array< value_type > &separators) const noexcept |
Splits this basic_string into substrings that are based on the characters in an array. | |
xtd::array< basic_string > | split (const xtd::array< value_type > &separators, xtd::string_split_options options) const noexcept |
Splits this basic_string into substrings based on the characters in an array. You can specify whether the substrings include empty array elements. | |
xtd::array< basic_string > | split (const xtd::array< value_type > &separators, xtd::size count) const noexcept |
Splits this basic_string into a maximum number of substrings based on the characters in an array. You also specify the maximum number of substrings to return. | |
xtd::array< basic_string > | split (const xtd::array< value_type > &separators, xtd::size count, xtd::string_split_options options) const noexcept |
Splits this basic_string into a maximum number of substrings based on the characters in an array. | |
bool | starts_with (value_type value) const noexcept |
Determines whether the beginning of this instance of xtd::basic_string matches a specified xtd::basic_string. | |
bool | starts_with (value_type value, bool ignore_case) const noexcept |
Determines whether the beginning of this instance of xtd::basic_string matches a specified xtd::basic_string, ignoring or honoring their case. | |
bool | starts_with (const basic_string &value) const noexcept |
Determines whether the beginning of this instance of xtd::basic_string matches a specified xtd::basic_string. | |
bool | starts_with (const basic_string &value, bool ignore_case) const noexcept |
Determines whether the beginning of this instance of xtd::basic_string matches a specified xtd::basic_string, ignoring or honoring their case. | |
bool | starts_with (const basic_string &value, xtd::string_comparison comparison_type) const noexcept |
Determines whether the end of this basic_string matches the specified basic_string when compared using the specified comparison option. | |
basic_string | substr () const |
Returns a substring [pos , pos + count ). If the requested substring extends past the end of the string, i.e. the count is greater than size() - pos (e.g. if count == xtd::basic_string::npos), the returned substring is [pos , size()). | |
basic_string | substr (size_type pos) const |
Returns a substring [pos , pos + count ). If the requested substring extends past the end of the string, i.e. the count is greater than size() - pos (e.g. if count == xtd::basic_string::npos), the returned substring is [pos , size()). | |
basic_string | substr (size_type pos, size_type count) const |
Returns a substring [pos , pos + count ). If the requested substring extends past the end of the string, i.e. the count is greater than size() - pos (e.g. if count == xtd::basic_string::npos), the returned substring is [pos , size()). | |
basic_string | substring (xtd::size start_index) const |
Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length. | |
basic_string | substring (xtd::size start_index, xtd::size length) const |
Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length. | |
xtd::array< value_type > | to_array () const noexcept |
Copies the characters in this instance to a Unicode character array. | |
xtd::array< value_type > | to_array (xtd::size start_index) const |
Copies the characters in this instance to a Unicode character array starting at specified index. | |
xtd::array< value_type > | to_array (xtd::size start_index, xtd::size length) const |
Copies the characters in this instance to a Unicode character array starting at specified index with specified length. | |
xtd::array< value_type > | to_char_array () const noexcept |
Copies the characters in this instance to a Unicode character array. | |
xtd::array< value_type > | to_char_array (xtd::size start_index, xtd::size length) const |
Copies the characters in this instance to a Unicode character array starting at specified index with specified length. | |
basic_string | to_lower () const noexcept |
Returns a copy of the current xtd::basic_string converted to lowercase. | |
basic_string< char > | to_string () const noexcept override |
Converts the value of this instance to a xtd::basic_string <char>. | |
basic_string | to_title_case () const noexcept |
Converts the current basic_string to title case (except for words that are entirely in uppercase, which are considered to be acronyms). | |
basic_string< xtd::char16 > | to_u16string () const noexcept |
Converts the value of this instance to a xtd::basic_string <xtd::char16>. | |
basic_string< xtd::char32 > | to_u32string () const noexcept |
Converts the value of this instance to a xtd::basic_string <xtd::char32>. | |
basic_string< xtd::char8 > | to_u8string () const noexcept |
Converts the value of this instance to a xtd::basic_string <xtd::char8>. | |
basic_string | to_upper () const noexcept |
Returns a copy of the current xtd::basic_string converted to uppercase. | |
basic_string< xtd::wchar > | to_wstring () const noexcept |
Converts the value of this instance to a xtd::basic_string <xtd::wchar>. | |
basic_string | trim () const noexcept |
Removes all leading and trailing occurrences of white-space characters from the specified xtd::basic_string. | |
basic_string | trim (value_type trim_char) const noexcept |
Removes all leading and trailing occurrences of a character specified from the specified xtd::basic_string . | |
basic_string | trim (const xtd::array< value_type > &trim_chars) const noexcept |
Removes all leading and trailing occurrences of a set of characters specified in an array from the specified xtd::basic_string. | |
basic_string | trim_end () const noexcept |
Removes all trailing occurrences of white-space characters from the specified xtd::basic_string. | |
basic_string | trim_end (value_type trim_char) const noexcept |
Removes all trailing occurrences of a character specified from the specified xtd::basic_string . | |
basic_string | trim_end (const xtd::array< value_type > &trim_chars) const noexcept |
Removes all trailing occurrences of a set of characters specified in an array from the specified xtd::basic_string. | |
basic_string | trim_start () const noexcept |
Removes all leading occurrences of white-space characters from the specified xtd::basic_string. | |
basic_string | trim_start (value_type trim_char) const noexcept |
Removes all leading occurrences of a character specified from the specified xtd::basic_string . | |
basic_string | trim_start (const xtd::array< value_type > &trim_chars) const noexcept |
Removes all leading occurrences of a set of characters specified in an array from the specified xtd::basic_string. | |
Public Static Methods | |
template<typename object_t > | |
static basic_string | class_name () |
Gets the class name of the object_t. | |
template<typename object_t > | |
static basic_string | class_name (const object_t &object) |
Gets the class name of the specified object. | |
static basic_string | class_name (const std::type_info &info) |
Gets the class name of the specified object. | |
static int32 | compare (const basic_string &str_a, const basic_string &str_b) noexcept |
Compares two specified basic_string objects and returns an integer that indicates their relative position in the sort order. | |
static int32 | compare (const basic_string &str_a, const basic_string &str_b, bool ignore_case) noexcept |
Compares two specified basic_string objects, ignoring or honoring their case, and returns an integer that indicates their relative position in the sort order. | |
static int32 | compare (const basic_string &str_a, const basic_string &str_b, xtd::string_comparison comparison_type) noexcept |
Compares two specified basic_string objects using the specified rules, and returns an integer that indicates their relative position in the sort order. | |
static int32 | compare (const basic_string &str_a, xtd::size index_a, const basic_string &str_b, xtd::size index_b, xtd::size length) |
Compares substrings of two specified basic_string objects and returns an integer that indicates their relative position in the sort order. | |
static int32 | compare (const basic_string &str_a, xtd::size index_a, const basic_string &str_b, xtd::size index_b, xtd::size length, bool ignore_case) |
Compares substrings of two specified basic_string objects, ignoring or honoring their case, and returns an integer that indicates their relative position in the sort order. | |
static int32 | compare (const basic_string &str_a, xtd::size index_a, const basic_string &str_b, xtd::size index_b, xtd::size length, xtd::string_comparison comparison_type) |
Compares substrings of two specified basic_string objects using the specified rules, and returns an integer that indicates their relative position in the sort order. | |
static basic_string | concat (const basic_string &str_a, const basic_string &str_b, const basic_string &str_c, const basic_string &str_d) noexcept |
Concatenates four specified instances of basic_string. | |
template<typename object_a_t , typename object_b_t , typename object_c_t , typename object_d_t > | |
static basic_string | concat (object_a_t obj_a, object_b_t obj_b, object_c_t obj_c, object_d_t obj_d) noexcept |
Concatenates four specified instances of object. | |
static basic_string | concat (const basic_string &str_a, const basic_string &str_b, const basic_string &str_c) noexcept |
Concatenates three specified instances of basic_string. | |
template<typename object_a_t , typename object_b_t , typename object_c_t > | |
static basic_string | concat (object_a_t obj_a, object_b_t obj_b, object_c_t obj_c) noexcept |
Concatenates three specified instances of object. | |
static basic_string | concat (const basic_string &str_a, const basic_string &str_b) noexcept |
Concatenates two specified instances of basic_string. | |
template<typename object_a_t , typename object_b_t > | |
static basic_string | concat (object_a_t obj_a, object_b_t obj_b) noexcept |
Concatenates two specified instances of object. | |
static basic_string | concat (const xtd::array< basic_string > &values) noexcept |
Concatenates the elements of a specified basic_string array. | |
template<typename object_t > | |
static basic_string | concat (const xtd::array< object_t > &args) noexcept |
Concatenates the basic_string representations of the elements in a specified object array. | |
template<typename value_t > | |
static basic_string | concat (value_t value) noexcept |
Creates the basic_string representation of a specified object. | |
static basic_string | demangle (const basic_string &name) |
Gets demangled basic_string of name,. | |
static bool | equals (const basic_string &a, const basic_string &b) noexcept |
Determines whether two specified xtd::basic_string objects have the same value. | |
template<typename char_a_t , typename char_b_t > | |
static bool | equals (const char_a_t *a, const char_b_t *b) noexcept |
Determines whether two specified xtd::basic_string objects have the same value. | |
static bool | equals (const basic_string &a, const basic_string &b, bool ignore_case) noexcept |
Determines whether two specified xtd::basic_string objects have the same value, ignoring or honoring their case. | |
template<typename char_a_t , typename char_b_t > | |
static bool | equals (const char_a_t *a, const char_b_t *b, bool ignore_case) noexcept |
Determines whether two specified xtd::basic_string objects have the same value, ignoring or honoring their case. | |
template<typename ... args_t> | |
static basic_string | format (const basic_string< char > &fmt, args_t &&... args) |
Writes the text representation of the specified arguments list, to string using the specified format information. | |
template<typename object_t > | |
static basic_string | full_class_name () |
Gets the fully qualified class name of the objec_t, including the namespace of the objec_t. | |
template<typename object_t > | |
static basic_string | full_class_name (const object_t &object) |
Gets the fully qualified class name of the specified object, including the namespace of the specified object. | |
static basic_string | full_class_name (const std::type_info &info) |
Gets the fully qualified class name of the specified object, including the namespace of the specified object. | |
static bool | is_empty (const xtd::basic_string< value_type, traits_type, allocator_type > &string) noexcept |
Indicates whether the specifeid basic_string is an empty basic_string (""). | |
template<typename collection_t > | |
static basic_string | join (const basic_string separator, const collection_t &values) noexcept |
Concatenates a specified separator basic_string between each element of a specified object array, yielding a single concatenated basic_string. | |
template<typename collection_t > | |
static basic_string | join (const basic_string &separator, const collection_t &values, xtd::size index) |
Concatenates a specified separator basic_string between each element of a specified object array, yielding a single concatenated basic_string. | |
template<typename collection_t > | |
static basic_string | join (const basic_string &separator, const collection_t &values, xtd::size index, xtd::size count) |
Concatenates a specified separator basic_string between each element of a specified Object array, yielding a single concatenated basic_string. | |
template<typename value_t > | |
static value_t | parse (const basic_string &str) |
Converts a basic_string into a value_t type. | |
template<typename ... args_t> | |
static basic_string | sprintf (const basic_string &fmt, args_t &&... args) noexcept |
Writes the text representation of the specified arguments list, to basic_string using the specified format information. | |
template<typename value_t > | |
static bool | try_parse (const basic_string &str, value_t &value) noexcept |
Try to convert a basic_string into a value_t type. | |
Additional Inherited Members | |
Public Types inherited from xtd::collections::generic::ienumerable< char_t > | |
using | iterator = typename enumerable_iterators< char_t, ienumerable< char_t > >::iterator |
Represents the iterator of xtd::collections::generic::ienumerable value type. | |
using | const_iterator = typename enumerable_iterators< char_t, ienumerable< char_t > >::const_iterator |
Represents the const iterator of xtd::collections::generic::ienumerable value type. | |
Public Types inherited from xtd::collections::generic::enumerable_iterators< type_t, enumerable_t > | |
using | const_iterator = const iterator |
Represents the const iterator of enumarable value type. | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual type_object | get_type () const noexcept |
Gets the type of the current instance. | |
template<typename object_t > | |
xtd::uptr< object_t > | memberwise_clone () const |
Creates a shallow copy of the current object. | |
Public Member Functions inherited from xtd::icomparable< basic_string< char_t, traits_t, allocator_t > > | |
virtual int32 | compare_to (const basic_string< char_t, traits_t, allocator_t > &obj) const noexcept=0 |
Compares the current instance with another object of the same type. | |
Public Member Functions inherited from xtd::iequatable< basic_string< char_t, traits_t, allocator_t > > | |
virtual bool | equals (const basic_string< char_t, traits_t, allocator_t > &) const noexcept=0 |
Indicates whether the current object is equal to another object of the same type. | |
Public Member Functions inherited from xtd::collections::generic::ienumerable< char_t > | |
Public Member Functions inherited from xtd::collections::generic::enumerable_iterators< type_t, enumerable_t > | |
virtual iterator | begin () |
Returns an iterator to the first element of the enumarable. | |
virtual iterator | end () |
Returns an iterator to the element following the last element of the enumarable. | |
Static Public Member Functions inherited from xtd::object | |
template<typename object_a_t , typename object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
template<typename object_a_t , typename object_b_t > | |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
using xtd::basic_string< char_t, traits_t, allocator_t >::base_type = std::basic_string<char_t, traits_t, allocator_t> |
Represents the basic string base type.
std::basic_string<char_t, traits_t, allocator_t>
.` using xtd::basic_string< char_t, traits_t, allocator_t >::traits_type = typename base_type::traits_type |
Represents the basic string traits type.
using xtd::basic_string< char_t, traits_t, allocator_t >::value_type = typename base_type::value_type |
Represents the basic string value type.
using xtd::basic_string< char_t, traits_t, allocator_t >::allocator_type = typename base_type::allocator_type |
Represents the basic string allocator type.
using xtd::basic_string< char_t, traits_t, allocator_t >::size_type = typename base_type::size_type |
Represents the basic string size type.
using xtd::basic_string< char_t, traits_t, allocator_t >::difference_type = typename base_type::difference_type |
Represents the basic string difference type.
using xtd::basic_string< char_t, traits_t, allocator_t >::reference = typename base_type::reference |
Represents the basic string referecne type.
using xtd::basic_string< char_t, traits_t, allocator_t >::const_reference = typename base_type::const_reference |
Represents the basic string const referecne type.
using xtd::basic_string< char_t, traits_t, allocator_t >::pointer = typename base_type::pointer |
Represents the basic string pointer type.
using xtd::basic_string< char_t, traits_t, allocator_t >::const_pointer = typename base_type::const_pointer |
Represents the basic string const pointer type.
using xtd::basic_string< char_t, traits_t, allocator_t >::iterator = typename xtd::collections::generic::ienumerable<char_t>::iterator |
Represents the basic string iterator type.
using xtd::basic_string< char_t, traits_t, allocator_t >::const_iterator = typename xtd::collections::generic::ienumerable<char_t>::const_iterator |
Represents the basic string const iterator type.
using xtd::basic_string< char_t, traits_t, allocator_t >::reverse_iterator = typename base_type::reverse_iterator |
Represents the basic string reverse iterator type.
using xtd::basic_string< char_t, traits_t, allocator_t >::const_reverse_iterator = typename base_type::const_reverse_iterator |
Represents the basic string const reverse iterator type.
using xtd::basic_string< char_t, traits_t, allocator_t >::enumerator_type = typename xtd::collections::generic::enumerator<value_type> |
Represents the basic string enumerator type.
|
default |
Initializes a new instance of xtd::basic_string.
|
explicitnoexcept |
Initializes a new instance of xtd::basic_string with specified allocator.
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index.
str | The string to copy. |
index | The index of the first substring character where start copy. |
xtd::argument_out_of_range_exception | `index` is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index.
str | The string to copy. |
index | The index of the first substring character where start copy. |
xtd::argument_out_of_range_exception | `index` is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index.
str | The string to copy. |
index | The index of the first substring character where start copy. |
xtd::argument_out_of_range_exception | `index` is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index.
str | The string to copy. |
index | The index of the first substring character where start copy. |
xtd::argument_out_of_range_exception | `index` is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index.
str | The string to copy. |
index | The index of the first substring character where start copy. |
xtd::argument_out_of_range_exception | `index` is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index and allocator.
str | The string to copy. |
index | The index of the first substring character where start copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
xtd::argument_out_of_range_exception | `index` is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index and allocator.
str | The string to copy. |
index | The index of the first substring character where start copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
xtd::argument_out_of_range_exception | `index` is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index and allocator.
str | The string to copy. |
index | The index of the first substring character where start copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
xtd::argument_out_of_range_exception | `index` is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index and allocator.
str | The string to copy. |
index | The index of the first substring character where start copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
xtd::argument_out_of_range_exception | `index` is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index and allocator.
str | The string to copy. |
index | The index of the first substring character where start copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
xtd::argument_out_of_range_exception | `index` is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index and count characters.
str | The string to copy. |
index | The index of the first substring character where start copy. |
count | The number of substring characters to copy. |
xtd::argument_out_of_range_exception | `index` + `count`is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index and count characters.
str | The string to copy. |
index | The index of the first substring character where start copy. |
count | The number of substring characters to copy. |
xtd::argument_out_of_range_exception | `index` + `count`is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index and count characters.
str | The string to copy. |
index | The index of the first substring character where start copy. |
count | The number of substring characters to copy. |
xtd::argument_out_of_range_exception | `index` + `count`is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index and count characters.
str | The string to copy. |
index | The index of the first substring character where start copy. |
count | The number of substring characters to copy. |
xtd::argument_out_of_range_exception | `index` + `count`is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index and count characters.
str | The string to copy. |
index | The index of the first substring character where start copy. |
count | The number of substring characters to copy. |
xtd::argument_out_of_range_exception | `index` + `count`is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index, count characters and allocator.
str | The string to copy. |
index | The index of the first substring character where start copy. |
count | The number of substring characters to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
xtd::argument_out_of_range_exception | `index` + `count`is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index, count characters and allocator.
str | The string to copy. |
index | The index of the first substring character where start copy. |
count | The number of substring characters to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
xtd::argument_out_of_range_exception | `index` + `count`is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index, count characters and allocator.
str | The string to copy. |
index | The index of the first substring character where start copy. |
count | The number of substring characters to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
xtd::argument_out_of_range_exception | `index` + `count`is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index, count characters and allocator.
str | The string to copy. |
index | The index of the first substring character where start copy. |
count | The number of substring characters to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
xtd::argument_out_of_range_exception | `index` + `count`is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring at index, count characters and allocator.
str | The string to copy. |
index | The index of the first substring character where start copy. |
count | The number of substring characters to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
xtd::argument_out_of_range_exception | `index` + `count`is greater or equal than `str` size. |
|
default |
Initializes a new instance of xtd::basic_string with specified string to move.
str | The basic_string to move. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to move and allocator.
str | The basic_string to move. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character.
str | The string to copy. |
count | The number of copies of character. |
character | The character copied. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator.
count | The number of copies of character. |
character | The character copied. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character.
count | The number of copies of character. |
character | The character copied. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator.
count | The number of copies of character. |
character | The character copied. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character.
count | The number of copies of character. |
character | The character copied. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator.
count | The number of copies of character. |
character | The character copied. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character.
count | The number of copies of character. |
character | The character copied. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator.
count | The number of copies of character. |
character | The character copied. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character.
count | The number of copies of character. |
character | The character copied. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator.
str | The string to copy. |
count | The number of copies of character. |
character | The character copied. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character.
character | The character copied. |
count | The number of copies of character. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator.
character | The character copied. |
count | The number of copies of character. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character.
character | The character copied. |
count | The number of copies of character. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator.
character | The character copied. |
count | The number of copies of character. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character.
character | The character copied. |
count | The number of copies of character. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator.
character | The character copied. |
count | The number of copies of character. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character.
character | The character copied. |
count | The number of copies of character. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator.
character | The character copied. |
count | The number of copies of character. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character.
character | The character copied. |
count | The number of copies of character. |
|
inline |
Initializes a new instance of xtd::basic_string with specified count copies of character and specified allocator.
character | The character copied. |
count | The number of copies of character. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inline |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inline |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inline |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inline |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inline |
Initializes a new instance of xtd::basic_string with specified string to copy, and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified string to copy, and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified string to copy, and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified string to copy, and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified string to copy, and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring and count characters.
count | The number of substring characters to copy. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring and count characters.
count | The number of substring characters to copy. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring and count characters.
count | The number of substring characters to copy. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring and count characters.
count | The number of substring characters to copy. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring and count characters.
count | The number of substring characters to copy. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring, count characters and allocator.
str | The string to copy. |
count | The number of substring characters to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring, count characters and allocator.
str | The string to copy. |
count | The number of substring characters to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring, count characters and allocator.
str | The string to copy. |
count | The number of substring characters to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring, count characters and allocator.
str | The string to copy. |
count | The number of substring characters to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified substring, count characters and allocator.
str | The string to copy. |
count | The number of substring characters to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy.
str | The string to copy. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlinenoexcept |
Initializes a new instance of xtd::basic_string with specified string to copy and allocator.
str | The string to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified first and last iterators of substring.
first | The first iterator of substring. |
last | The first iterator of substring. |
|
inline |
Initializes a new instance of xtd::basic_string with specified first and last iterators of substring and allocator.
first | The first iterator of substring. |
last | The first iterator of substring. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlineexplicitconstexpr |
Initializes a new instance of xtd::basic_string with specified string view of substring and allocator.
string_view | The basic_string view. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlineexplicitconstexpr |
Initializes a new instance of xtd::basic_string with specified string view of substring and allocator.
string_view | The basic_string view. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlineconstexpr |
Initializes a new instance of xtd::basic_string with specified string view of substring and allocator.
string_view | The basic_string view. |
index | The index of the first substring character where start copy. |
count | The number of substring characters to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inlineconstexpr |
Initializes a new instance of xtd::basic_string with specified string view of substring and allocator.
string_view | The basic_string view. |
index | The index of the first substring character where start copy. |
count | The number of substring characters to copy. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified initializer list.
il | The initializer list to fill. |
|
inline |
Initializes a new instance of xtd::basic_string with specified initializer list.
il | The initializer list to fill. |
|
inline |
Initializes a new instance of xtd::basic_string with specified initializer list.
il | The initializer list to fill. |
|
inline |
Initializes a new instance of xtd::basic_string with specified initializer list.
il | The initializer list to fill. |
|
inline |
Initializes a new instance of xtd::basic_string with specified initializer list.
il | The initializer list to fill. |
|
inline |
Initializes a new instance of xtd::basic_string with specified initializer list and allocator.
il | The initializer list to fill. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified initializer list and allocator.
il | The initializer list to fill. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified initializer list and allocator.
il | The initializer list to fill. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified initializer list and allocator.
il | The initializer list to fill. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Initializes a new instance of xtd::basic_string with specified initializer list and allocator.
il | The initializer list to fill. |
allocator | The allocator to use for all memory allocations of this basic_string. |
|
inline |
Returns reference to the last character in the string.
operator[](size() - 1)
. xtd::index_out_of_range_exception | If is empty. |
|
inlineoverridevirtual |
Returns an iterator to the first character of the string.
Reimplemented from xtd::collections::generic::enumerable_iterators< type_t, enumerable_t >.
|
inlinenoexcept |
Returns a pointer to a null-terminated character array with data equivalent to those stored in the string.
c_str()
, c_str() + size()
] is valid and the values in it correspond to the values stored in the string with an additional null character after the last position.
|
inlinenoexcept |
Returns the number of characters that the string has currently allocated space for.
|
inlineoverridevirtual |
Returns an iterator to the first character of the string.
Reimplemented from xtd::collections::generic::enumerable_iterators< type_t, enumerable_t >.
|
inline |
Returns a reverse iterator to the first character of the string.
|
inlinenoexcept |
Returns a reference to the underlying base type.
|
inlineoverridevirtual |
Returns an iterator to the character following the last character of the string. This character acts as a placeholder, attempting to access it results in undefined behavior.
Reimplemented from xtd::collections::generic::enumerable_iterators< type_t, enumerable_t >.
|
inline |
Returns a reverse iterator to the character following the last character of the string. This character acts as a placeholder, attempting to access it results in undefined behavior.
|
inlinenoexcept |
Returns a pointer to the underlying array serving as character storage. The pointer is such that the range [data()
, data() + size()
] is valid and the values in it correspond to the values stored in the string.
|
inlinenoexcept |
Checks if the string has no characters, i.e. whether begin() == end()
.
true
if the string is empty; otherwise false
.
|
inlineoverridevirtual |
Returns an iterator to the character following the last character of the string. This character acts as a placeholder, attempting to access it results in undefined behavior.
Reimplemented from xtd::collections::generic::enumerable_iterators< type_t, enumerable_t >.
|
inline |
Returns reference to the first character in the string. The behavior is undefined if empty() is true.
operator[](0)
. xtd::index_out_of_range_exception | If is empty. |
|
inlinenoexcept |
Gets the number of characters in the current xtd::basic_string object.
|
inlinenoexcept |
|
inline |
Returns a reverse iterator to the first character of the string.
|
inline |
Returns a reverse iterator to the character following the last character of the string. This character acts as a placeholder, attempting to access it results in undefined behavior.
|
inlinenoexcept |
|
inline |
Returns a reference to the character at specified location pos
.
xtd::index_out_of_range_exception | If `index` is not within the range of the string. |
|
inline |
Compares two character sequences.
str | The other string to compare to. |
*this
appears before the character sequence specified by the arguments, in lexicographical order.*this
appears after the character sequence specified by the arguments, in lexicographical order. count1
characters starting at data1
is compared to a character sequence consisting of count2
characters starting at data2
as follows:size_type rlen = std::min(count1, count2)
.traits_t::compare(data1, data2, rlen)
. For standard strings this function performs character-by-character lexicographical comparison. If the result is zero (the character sequences are equal so far), then their sizes are compared as follows: Condition | Result | Return value |
---|---|---|
traits_t::compare(data1, data2, rlen) < 0 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 < size2 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 == size2 | data1 is equal to data2 | 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 > size2 | data1 is greater than data2 | > 0 |
traits_t::compare(data1, data2, rlen) > 0 | data1 is greater than data2 | > 0 |
|
inline |
Compares two character sequences.
pos1 | The position of the first character in this string to compare. |
count1 | The number of characters of this string to compare. |
str | The other string to compare to. |
*this
appears before the character sequence specified by the arguments, in lexicographical order.*this
appears after the character sequence specified by the arguments, in lexicographical order. pos1
, pos1 + count1
) substring of this string to str
.
count1
characters starting at data1
is compared to a character sequence consisting of count2
characters starting at data2
as follows:size_type rlen = std::min(count1, count2)
.traits_t::compare(data1, data2, rlen)
. For standard strings this function performs character-by-character lexicographical comparison. If the result is zero (the character sequences are equal so far), then their sizes are compared as follows: Condition | Result | Return value |
---|---|---|
traits_t::compare(data1, data2, rlen) < 0 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 < size2 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 == size2 | data1 is equal to data2 | 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 > size2 | data1 is greater than data2 | > 0 |
traits_t::compare(data1, data2, rlen) > 0 | data1 is greater than data2 | > 0 |
|
inline |
Compares two character sequences.
pos1 | The position of the first character in this string to compare. |
count1 | The number of characters of this string to compare. |
str | The other string to compare to. |
pos2 | The position of the first character of the given string to compare. |
*this
appears before the character sequence specified by the arguments, in lexicographical order.*this
appears after the character sequence specified by the arguments, in lexicographical order. pos1
, pos1 + count1
) substring of this string to a substring [pos2
, pos2 + count2
) of str
.
count1
characters starting at data1
is compared to a character sequence consisting of count2
characters starting at data2
as follows:size_type rlen = std::min(count1, count2)
.traits_t::compare(data1, data2, rlen)
. For standard strings this function performs character-by-character lexicographical comparison. If the result is zero (the character sequences are equal so far), then their sizes are compared as follows: Condition | Result | Return value |
---|---|---|
traits_t::compare(data1, data2, rlen) < 0 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 < size2 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 == size2 | data1 is equal to data2 | 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 > size2 | data1 is greater than data2 | > 0 |
traits_t::compare(data1, data2, rlen) > 0 | data1 is greater than data2 | > 0 |
|
inline |
Compares two character sequences.
pos1 | The position of the first character in this string to compare. |
count1 | The number of characters of this string to compare. |
str | The other string to compare to. |
pos2 | The position of the first character of the given string to compare. |
count2 | The number of characters of the given string to compare. |
*this
appears before the character sequence specified by the arguments, in lexicographical order.*this
appears after the character sequence specified by the arguments, in lexicographical order. pos1
, pos1 + count1
) substring of this string to a substring [pos2
, pos2 + count2
) of str
.
count1
characters starting at data1
is compared to a character sequence consisting of count2
characters starting at data2
as follows:size_type rlen = std::min(count1, count2)
.traits_t::compare(data1, data2, rlen)
. For standard strings this function performs character-by-character lexicographical comparison. If the result is zero (the character sequences are equal so far), then their sizes are compared as follows: Condition | Result | Return value |
---|---|---|
traits_t::compare(data1, data2, rlen) < 0 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 < size2 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 == size2 | data1 is equal to data2 | 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 > size2 | data1 is greater than data2 | > 0 |
traits_t::compare(data1, data2, rlen) > 0 | data1 is greater than data2 | > 0 |
|
inline |
Compares two character sequences.
s | pointer to the character string to compare to. |
*this
appears before the character sequence specified by the arguments, in lexicographical order.*this
appears after the character sequence specified by the arguments, in lexicographical order. s
with length traits_t::length(s)
. count1
characters starting at data1
is compared to a character sequence consisting of count2
characters starting at data2
as follows:size_type rlen = std::min(count1, count2)
.traits_t::compare(data1, data2, rlen)
. For standard strings this function performs character-by-character lexicographical comparison. If the result is zero (the character sequences are equal so far), then their sizes are compared as follows: Condition | Result | Return value |
---|---|---|
traits_t::compare(data1, data2, rlen) < 0 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 < size2 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 == size2 | data1 is equal to data2 | 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 > size2 | data1 is greater than data2 | > 0 |
traits_t::compare(data1, data2, rlen) > 0 | data1 is greater than data2 | > 0 |
|
inline |
Compares two character sequences.
pos1 | The position of the first character in this string to compare. |
count1 | The number of characters of this string to compare. |
s | pointer to the character string to compare to. |
*this
appears before the character sequence specified by the arguments, in lexicographical order.*this
appears after the character sequence specified by the arguments, in lexicographical order. pos1
, pos1 + count1
) substring of this string to the null-terminated character sequence beginning at the character pointed to by s
with length traits_t::length(s)
.count1 > size() - pos1
, the substring is [pos1$ , size()). @remarks A character sequence consisting of
count1characters starting at
data1is compared to a character sequence consisting of
count2characters starting at
data2as follows:
First, calculate the number of characters to compare, as if by
size_type rlen = std::min(count1, count2).
Then compare the sequences by calling
traits_t::compare(data1, data2, rlen)`. For standard strings this function performs character-by-character lexicographical comparison. If the result is zero (the character sequences are equal so far), then their sizes are compared as follows: Condition | Result | Return value |
---|---|---|
traits_t::compare(data1, data2, rlen) < 0 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 < size2 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 == size2 | data1 is equal to data2 | 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 > size2 | data1 is greater than data2 | > 0 |
traits_t::compare(data1, data2, rlen) > 0 | data1 is greater than data2 | > 0 |
|
inline |
Compares two character sequences.
pos1 | The position of the first character in this string to compare. |
count1 | The number of characters of this string to compare. |
s | pointer to the character string to compare to. |
count2 | The number of characters of the given string to compare. |
*this
appears before the character sequence specified by the arguments, in lexicographical order.*this
appears after the character sequence specified by the arguments, in lexicographical order. pos1
, pos1 + count1
) substring of this string to the characters in the range [s
, s + count2
). The characters in [s
, s + count2
) may include null characters.
count1
characters starting at data1
is compared to a character sequence consisting of count2
characters starting at data2
as follows:size_type rlen = std::min(count1, count2)
.traits_t::compare(data1, data2, rlen)
. For standard strings this function performs character-by-character lexicographical comparison. If the result is zero (the character sequences are equal so far), then their sizes are compared as follows: Condition | Result | Return value |
---|---|---|
traits_t::compare(data1, data2, rlen) < 0 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 < size2 | data1 is less than data2 | < 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 == size2 | data1 is equal to data2 | 0 |
traits_t::compare(data1, data2, rlen) == 0 and size1 > size2 | data1 is greater than data2 | > 0 |
traits_t::compare(data1, data2, rlen) > 0 | data1 is greater than data2 | > 0 |
|
inline |
Compares this instance with a specified xtd::object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified xtd::object.
value | An object that evaluates to a xtd::basic_string. |
Value | Condition |
---|---|
Less than zero | This instance precedes value . |
Zero | This instance has the same position in the sort order as value . |
Greater than zero | This instance follows value . |
xtd::argument_exception | `value` is not a xtd::basic_string. |
|
inlineoverridenoexcept |
Compares this instance with a specified xtd::basic_string object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified string.
value | The string to compare with this instance. |
value
parameter. Value | Condition |
---|---|
Less than zero | This instance precedes value . |
Zero | This instance has the same position in the sort order as value . |
Greater than zero | This instance follows value . |
|
inlinevirtualnoexcept |
Returns a value indicating whether a specified char occurs within this basic_string.
value | The char to seek. |
|
inlinevirtualnoexcept |
Returns a value indicating whether a specified substring occurs within this basic_string.
value | The basic_string to seek. |
|
inlineoverridevirtualnoexcept |
Determines whether this instance and a specified object, which must also be a xtd::basic_string object, have the same value.
obj | The basic_string to compare to this instance. |
true
if obj
is a xtd::basic_string and its value is the same as this instance; otherwise, false
. Reimplemented from xtd::object.
|
inlineoverridenoexcept |
Determines whether this instance and another specified xtd::basic_string object have the same value.
value | The basic_string to compare to this instance. |
true
if the value
of the value parameter is the same as the value of this instance; otherwise, false
.
|
inlinenoexcept |
Determines whether this instance and another specified xtd::basic_string object have the same value, ignoring or honoring their case.
value | The basic_string to compare to this instance. |
ignore_case | true to ignore case when comparing this instance and value; otherwise, false |
true
if the value
of the value parameter is the same as the value of this instance; otherwise, false
.
|
inlinenoexcept |
Determines whether the end of this basic_string matches the specified character.
value | The char_t to compare to the substring at the end of this instance. |
|
inlinenoexcept |
Determines whether the end of this basic_string matches the specified character, ignoring or honoring their case.
value | The char_t to compare to the substring at the end of this instance. |
ignore_case | true to ignore case during the comparison; otherwise, false. |
|
inlinenoexcept |
Determines whether the end of this basic_string matches the specified basic_string.
value | The basic_string to compare to the substring at the end of this instance. |
|
inlinenoexcept |
Determines whether the end of this basic_string instance matches the specified basic_string, ignoring or honoring their case.
value | The string to compare to the substring at the end of this instance. |
ignore_case | true to ignore case during the comparison; otherwise, false. |
|
inlinenoexcept |
Determines whether the end of this basic_string matches the specified basic_string when compared using the specified comparison option.
value | The string to compare to the substring at the end of this instance. |
comparison_type | One of the enumeration values that determines how this basic_string and value are compared. |
|
inline |
Finds the first substring equal to the given character sequence. Search begins at 0
, i.e. the found substring must not begin in a position preceding 0
.
str
.
|
inline |
Finds the first substring equal to the given character sequence. Search begins at pos
, i.e. the found substring must not begin in a position preceding pos
.
str | The string to search for. |
pos | The position at which to start the search |
str
.
|
inline |
Finds the first substring equal to the given character sequence. Search begins at pos
, i.e. the found substring must not begin in a position preceding pos
.
str | The string to search for. |
pos | The position at which to start the search |
count | The length of substring to search for. |
s
, s + count
) is not a valid range, the behavior is undefined.
|
inline |
Finds the first substring equal to the given character sequence. Search begins at 0
, i.e. the found substring must not begin in a position preceding 0
.
s | The pointer to a character string to search for. |
s
. The length of the string is determined by the first null character using traits_t::length(s)
. s
, s + traits_t::length(s)
) is not a valid range, the behavior is undefined.
|
inline |
Finds the first substring equal to the given character sequence. Search begins at pos
, i.e. the found substring must not begin in a position preceding pos
.
s | The pointer to a character string to search for. |
pos | The position at which to start the search |
s
. The length of the string is determined by the first null character using traits_t::length(s)
. s
, s + traits_t::length(s)
) is not a valid range, the behavior is undefined.
|
inline |
Finds the first substring equal to the given character sequence. Search begins at 0
, i.e. the found substring must not begin in a position preceding 0
.
ch | The character to search for. |
ch
(treated as a single-character substring by the formal rules below).
|
inline |
Finds the first substring equal to the given character sequence. Search begins at pos
, i.e. the found substring must not begin in a position preceding pos
.
ch | The character to search for. |
pos | The position at which to start the search |
ch
(treated as a single-character substring by the formal rules below).
|
inline |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos
, size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. @parzm str The string identifying characters to search for.
str
.
|
inline |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos
, size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned.
str | The string identifying characters to search for. |
pos | The position at which to begin searching. |
str
.
|
inline |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos
, size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned.
s | The pointer to a character string identifying characters to search for. |
pos | The position at which to begin searching. |
count | The length of character string identifying characters to search for. |
s
, s + count
). This range can include null characters. s
, s + count
) is not a valid range, the behavior is undefined.
|
inline |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos
, size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned.
s | The pointer to a character string identifying characters to search for. |
s
. The length of the string is determined by the first null character using traits_t::length(s)
. s
, s + traits_t::length(s)
) is not a valid range, the behavior is undefined.
|
inline |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos
, size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned.
s | The pointer to a character string identifying characters to search for. |
pos | The position at which to begin searching. |
s
. The length of the string is determined by the first null character using traits_t::length(s)
. s
, s + traits_t::length(s)
) is not a valid range, the behavior is undefined.
|
inline |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos
, size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned.
ch | The character to search for. |
ch
.
|
inline |
Finds the first character equal to one of the characters in the given character sequence. The search considers only the range [pos
, size()). If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned.
ch | The character to search for. |
pos | The position at which to begin searching. |
ch
.
|
inline |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos
, size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned. @parzm str The string identifying characters to search for.
str
.
|
inline |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos
, size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned.
str | The string identifying characters to search for. |
pos | The position at which to begin searching. |
str
.
|
inline |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos
, size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned.
s | The pointer to a character string identifying characters to search for. |
pos | The position at which to begin searching. |
count | The length of character string identifying characters to search for. |
s
, s + count
). This range can include null characters. s
, s + count
) is not a valid range, the behavior is undefined.
|
inline |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos
, size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned.
s | The pointer to a character string identifying characters to search for. |
s
. The length of the string is determined by the first null character using traits_t::length(s)
. s
, s + traits_t::length(s)
) is not a valid range, the behavior is undefined.
|
inline |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos
, size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned.
s | The pointer to a character string identifying characters to search for. |
pos | The position at which to begin searching. |
s
. The length of the string is determined by the first null character using traits_t::length(s)
. s
, s + traits_t::length(s)
) is not a valid range, the behavior is undefined.
|
inline |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos
, size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned.
ch | The character to search for. |
ch
.
|
inline |
Finds the first character equal to none of the characters in the given character sequence. The search considers only the range [pos
, size()). If all characters in the range can be found in the given character sequence, xtd::basic_string::npos will be returned.
ch | The character to search for. |
pos | The position at which to begin searching. |
ch
.
|
inline |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0
, pos
]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned. @parzm str The string identifying characters to search for.
str
.
|
inline |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0
, pos
]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned.
str | The string identifying characters to search for. |
pos | The position at which to begin searching. |
str
.
|
inline |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0
, pos
]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned.
s | The pointer to a character string identifying characters to search for. |
pos | The position at which to begin searching. |
count | The length of character string identifying characters to search for. |
s
, s + count
). This range can include null characters. s
, s + count
) is not a valid range, the behavior is undefined.
|
inline |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0
, pos
]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned.
s | The pointer to a character string identifying characters to search for. |
s
. The length of the string is determined by the first null character using traits_t::length(s)
. s
, s + traits_t::length(s)
) is not a valid range, the behavior is undefined.
|
inline |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0
, pos
]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned.
s | The pointer to a character string identifying characters to search for. |
pos | The position at which to begin searching. |
s
. The length of the string is determined by the first null character using traits_t::length(s)
. s
, s + traits_t::length(s)
) is not a valid range, the behavior is undefined.
|
inline |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0
, pos
]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned.
ch | The character to search for. |
ch
.
|
inline |
Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the range [0
, pos
]. If none of the characters in the given character sequence is present in the range, xtd::basic_string::npos will be returned.
ch | The character to search for. |
pos | The position at which to begin searching. |
ch
.
|
inline |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0
, pos
]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned. @parzm str The string identifying characters to search for.
str
.
|
inline |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0
, pos
]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned.
str | The string identifying characters to search for. |
pos | The position at which to begin searching. |
str
.
|
inline |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0
, pos
]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned.
s | The pointer to a character string identifying characters to search for. |
pos | The position at which to begin searching. |
count | The length of character string identifying characters to search for. |
s
, s + count
). This range can include null characters. s
, s + count
) is not a valid range, the behavior is undefined.
|
inline |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0
, pos
]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned.
s | The pointer to a character string identifying characters to search for. |
s
. The length of the string is determined by the first null character using traits_t::length(s)
. s
, s + traits_t::length(s)
) is not a valid range, the behavior is undefined.
|
inline |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0
, pos
]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned.
s | The pointer to a character string identifying characters to search for. |
pos | The position at which to begin searching. |
s
. The length of the string is determined by the first null character using traits_t::length(s)
. s
, s + traits_t::length(s)
) is not a valid range, the behavior is undefined.
|
inline |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0
, pos
]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned.
ch | The character to search for. |
ch
.
|
inline |
Finds the last character equal to none of the characters in the given character sequence. The search considers only the range [0
, pos
]. If all characters in the range can be found in the given character sequence,xtd::basic_string::npos will be returned.
ch | The character to search for. |
pos | The position at which to begin searching. |
ch
.
|
inline |
Returns the allocator associated with the string.
|
inlinevirtualnoexcept |
Returns the underlying base type.
|
inlineoverridevirtualnoexcept |
|
inlineoverridevirtualnoexcept |
Returns an enumerator that iterates through a collection.
Implements xtd::collections::generic::ienumerable< char_t >.
|
inlinenoexcept |
Reports the index of the first occurrence of the specified basic_string in this basic_string.
value | An unicode character to seek |
|
inline |
Reports the index of the first occurrence of the specified character in this basic_string. The search starts at a specified character position.
value | An unicode character to seek |
start_index | The search starting position |
|
inline |
Reports the index of the first occurrence of the specified character in this basic_string. The search starts at a specified character position and examines a specified number of character positions.
value | An unicode character to seek |
start_index | The search starting position |
count | The number of character positions to examine |
xtd::index_out_of_range_exception | start_index + count are greater than the length of this instance. |
|
inlinenoexcept |
Reports the index of the first occurrence of the specified character in this basic_string.
value | An unicode character to seek |
|
inline |
Reports the index of the first occurrence of the specified character in this basic_string. The search starts at a specified character position.
value | An unicode character to seek |
start_index | The search starting position |
|
inline |
Reports the index of the first occurrence of the specified character in this basic_string. The search starts at a specified character position and examines a specified number of character positions.
value | An unicode character to seek |
start_index | The search starting position |
count | The number of character positions to examine |
xtd::index_out_of_range_exception | start_index + count are greater than the length of this instance. |
|
noexcept |
Reports the index of the first occurrence in this instance of any character in a specified array of characters.
values | An unicode character array containing one or more characters to seek |
xtd::size xtd::basic_string< char_t, traits_t, allocator_t >::index_of_any | ( | const xtd::array< value_type > & | values, |
xtd::size | start_index | ||
) | const |
Reports the index of the first occurrence in this instance of any character in a specified array of characters. The search starts at a specified character position.
values | An unicode character array containing one or more characters to seek |
start_index | The search starting position |
xtd::index_out_of_range_exception | start_index + count are greater than the length of this instance. |
xtd::size xtd::basic_string< char_t, traits_t, allocator_t >::index_of_any | ( | const xtd::array< value_type > & | values, |
xtd::size | start_index, | ||
xtd::size | count | ||
) | const |
Reports the index of the first occurrence in this instance of any character in a specified array of characters. The search starts at a specified character position.
values | An unicode character array containing one or more characters to seek |
start_index | The search starting position |
count | The number of character positions to examine. |
xtd::index_out_of_range_exception | start_index + count are greater than the length of this instance. |
|
inline |
Inserts a specified instance of basic_string at a specified index position in this instance.
start_index | The index position of the insertion. |
value | The basic_string to insert. |
|
inlinenoexcept |
Indicates whether this basic_string is an empty basic_string ("").
|
inlinenoexcept |
Reports the index of the last occurrence of the specified basic_string in this basic_string.
value | An unicode character to seek |
|
inline |
Reports the index of the last occurrence of the specified character in this basic_string. The search starts at a specified character position.
value | An unicode character to seek |
start_index | The search starting position |
xtd::index_out_of_range_exception | start_index + count are greater than the length of this instance. |
|
inline |
Reports the index of the last occurrence of the specified character in this basic_string. The search starts at a specified character position and examines a specified number of character positions.
value | An unicode character to seek |
start_index | The search starting position |
count | The number of character positions to examine |
xtd::index_out_of_range_exception | start_index + count are greater than the length of this instance. |
|
inlinenoexcept |
Reports the index of the last occurrence of the specified character in this tring.
value | An unicode character to seek |
|
inline |
Reports the index of the last occurrence of the specified character in this basic_string. The search starts at a specified character position.
value | An unicode character to seek |
start_index | The search starting position |
xtd::index_out_of_range_exception | start_index + count are greater than the length of this instance. |
|
inline |
Reports the index of the last occurrence of the specified character in this basic_string. The search starts at a specified character position and examines a specified number of character positions.
str | A basic_string to find last index of. |
value | An unicode character to seek |
start_index | The search starting position |
count | The number of character positions to examine |
xtd::index_out_of_range_exception | start_index + count are greater than the length of this instance. |
|
noexcept |
Reports the index of the last occurrence in this instance of any character in a specified array of characters.
values | An unicode character array containing one or more characters to seek |
xtd::size xtd::basic_string< char_t, traits_t, allocator_t >::last_index_of_any | ( | const xtd::array< value_type > & | values, |
xtd::size | start_index | ||
) | const |
Reports the index of the last occurrence in this instance of any character in a specified array of characters. The search starts at a specified character position.
values | An unicode character array containing one or more characters to seek |
start_index | The search starting position |
xtd::size xtd::basic_string< char_t, traits_t, allocator_t >::last_index_of_any | ( | const xtd::array< value_type > & | values, |
xtd::size | start_index, | ||
xtd::size | count | ||
) | const |
Reports the index of the last occurrence in this instance of any character in a specified array of characters. The search starts at a specified character position.
values | An unicode character array containing one or more characters to seek |
start_index | The search starting position |
count | The number of character positions to examine. |
|
inlinenoexcept |
Right-aligns the characters in this basic_string, padding with spaces on the left for a specified total length.
total_width | The number of characters in the resulting basic_string, equal to the number of original characters plus any additional padding characters. |
|
inlinenoexcept |
Right-aligns the characters in this basic_string, padding with spaces on the left for a specified total length.
total_width | The number of characters in the resulting basic_string, equal to the number of original characters plus any additional padding characters. |
paddingChar | An unicode padding character. |
|
inlinenoexcept |
Left-aligns the characters in this basic_string, padding with spaces on the right for a specified total length.
totalWidth | The number of characters in the resulting basic_string, equal to the number of original characters plus any additional padding characters. |
|
inlinenoexcept |
Left-aligns the characters in this basic_string, padding with spaces on the right for a specified total length.
totalWidth | The number of characters in the resulting basic_string, equal to the number of original characters plus any additional padding characters. |
paddingChar | An unicode padding character. |
|
inline |
Allows insertion and extraction of quoted strings, such as the ones found in CSV or XML.
"by default and the escape is set to
\
by default.
|
inline |
Allows insertion and extraction of quoted strings, such as the ones found in CSV or XML ith specified delimiter.
delimiter | The character to use as the delimiter, defaults to "</tt>.
@return A new quoted basic_string.
@remarks for more information see <a href="https://en.cppreference.com/w/cpp/io/manip/quoted" >std::quoted. |
|
inline |
Allows insertion and extraction of quoted strings, such as the ones found in CSV or XML ith specified delimiter and escape.
delimiter | The character to use as the delimiter, defaults to "</tt>.
@param escape The character to use as the escape character, defaults to <tt>\\</tt>.
@return A new quoted basic_string.
@remarks for more information see <a href="https://en.cppreference.com/w/cpp/io/manip/quoted" >std::quoted. |
|
inline |
Deletes all the characters from this basic_string beginning at a specified position and continuing through the last position.
start_index | The position to begin deleting characters. |
|
inline |
Deletes all the characters from this basic_string beginning at a specified position and continuing through the last position.
start_index | The position to begin deleting characters. |
count | The number of characters to delete. |
|
inlinenoexcept |
Replaces all occurrences of a specified char_t in this basic_string with another specified char_t.
old_char | A char_t to be replaced. |
new_char | A char_t to replace all occurrences of old_char. |
|
inlinenoexcept |
Replaces all occurrences of a specified basic_string in this basic_string with another specified basic_string.
old_string | A basic_string to be replaced. |
new_string | A basic_string to replace all occurrences of old_string. |
|
inline |
Finds the last substring that is equal to the given character sequence. The search begins at xtd::basic_string::nposand proceeds from right to left (thus, the found substring, if any, cannot begin in a position following xtd::basic_string::npos). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as xtd::basic_string::npos, the whole string will be searched. @return Position of the first character of the found substring or xtd::basic_string::npos if no such substring is found. @remarks Finds the first substring equal to
str`.
|
inline |
Finds the last substring that is equal to the given character sequence. The search begins at pos
and proceeds from right to left (thus, the found substring, if any, cannot begin in a position following pos
). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as pos
, the whole string will be searched.
str | The string to search for. |
pos | The position at which to start the search |
str
.
|
inline |
Finds the last substring that is equal to the given character sequence. The search begins at pos
and proceeds from right to left (thus, the found substring, if any, cannot begin in a position following pos
). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as pos
, the whole string will be searched.
str | The string to search for. |
pos | The position at which to start the search |
count | The length of substring to search for. |
s
, s + count
) is not a valid range, the behavior is undefined.
|
inline |
Finds the last substring that is equal to the given character sequence. The search begins at xtd::basic_string::nposand proceeds from right to left (thus, the found substring, if any, cannot begin in a position following xtd::basic_string::npos). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as xtd::basic_string::npos, the whole string will be searched. @param s The pointer to a character string to search for. @return Position of the first character of the found substring or xtd::basic_string::npos if no such substring is found. @remarks Finds the first substring equal to the character string pointed to by
s. The length of the string is determined by the first null character using
traits_t::length(s). @remarks If [
s,
s + traits_t::length(s)`) is not a valid range, the behavior is undefined.
|
inline |
Finds the last substring that is equal to the given character sequence. The search begins at pos
and proceeds from right to left (thus, the found substring, if any, cannot begin in a position following pos
). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as pos
, the whole string will be searched.
s | The pointer to a character string to search for. |
pos | The position at which to start the search |
s
. The length of the string is determined by the first null character using traits_t::length(s)
. s
, s + traits_t::length(s)
) is not a valid range, the behavior is undefined.
|
inline |
Finds the last substring that is equal to the given character sequence. The search begins at xtd::basic_string::nposand proceeds from right to left (thus, the found substring, if any, cannot begin in a position following xtd::basic_string::npos). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as xtd::basic_string::npos, the whole string will be searched. @param ch The character to search for. @return Position of the first character of the found substring or xtd::basic_string::npos if no such substring is found. @remarks Finds the first character
ch` (treated as a single-character substring by the formal rules below).
|
inline |
Finds the last substring that is equal to the given character sequence. The search begins at pos
and proceeds from right to left (thus, the found substring, if any, cannot begin in a position following pos
). If xtd::basic_string::npos or any value not smaller than xtd::basic_string::size() - 1 is passed as pos
, the whole string will be searched.
ch | The character to search for. |
pos | The position at which to start the search |
ch
(treated as a single-character substring by the formal rules below).
|
noexcept |
Splits this basic_string into substrings that are based on the default white-space characters. White-space characters are defined by the c++ standard and return true if they are passed to the xtd::char_object::isspace() or std::iswspace() method.
|
noexcept |
Splits this basic_string into substrings that are based on the characters in an array.
separator | A character that delimits the substrings in this basic_string. |
|
noexcept |
Splits this basic_string into substrings based on the characters in an array. You can specify whether the substrings include empty array elements.
separator | A character that delimits the substrings in this basic_string |
options | xtd::string_split_options::remove_empty_entries to omit empty array elements from the array returned; or None to include empty array elements in the array returned. |
|
noexcept |
Splits this basic_string into a maximum number of substrings based on the characters in an array. You also specify the maximum number of substrings to return.
separator | A character array that delimits the substrings in this basic_string, an empty array that contains no delimiters. |
count | The maximum number of substrings to return. |
|
noexcept |
Splits this basic_string into a maximum number of substrings based on the characters in an array.
separators | A character array that delimits the substrings in this basic_string, an empty array that contains no delimiters. |
count | The maximum number of substrings to return. |
options | xtd::string_split_options::remove_empty_entries to omit empty array elements from the array returned; or None to include empty array elements in the array returned. |
|
noexcept |
Splits this basic_string into substrings that are based on the characters in an array.
separators | A character array that delimits the substrings in this basic_string, an empty array that contains no delimiters. |
|
noexcept |
Splits this basic_string into substrings based on the characters in an array. You can specify whether the substrings include empty array elements.
separators | A character array that delimits the substrings in this basic_string, an empty array that contains no delimiters. |
options | xtd::string_split_options::remove_empty_entries to omit empty array elements from the array returned; or None to include empty array elements in the array returned. |
|
noexcept |
Splits this basic_string into a maximum number of substrings based on the characters in an array. You also specify the maximum number of substrings to return.
separators | A character array that delimits the substrings in this basic_string, an empty array that contains no delimiters. |
count | The maximum number of substrings to return. |
|
noexcept |
Splits this basic_string into a maximum number of substrings based on the characters in an array.
separators | A character array that delimits the substrings in this basic_string, an empty array that contains no delimiters. |
count | The maximum number of substrings to return. |
options | xtd::string_split_options::remove_empty_entries to omit empty array elements from the array returned; or None to include empty array elements in the array returned. |
|
inlinenoexcept |
Determines whether the beginning of this instance of xtd::basic_string matches a specified xtd::basic_string.
value | A xtd::basic_string to compare to. |
|
inlinenoexcept |
Determines whether the beginning of this instance of xtd::basic_string matches a specified xtd::basic_string, ignoring or honoring their case.
value | A xtd::basic_string to compare to. |
ignore_case | true to ignore case when comparing the specified basic_string and value; otherwise, false |
|
inlinenoexcept |
Determines whether the beginning of this instance of xtd::basic_string matches a specified xtd::basic_string.
value | A xtd::basic_string to compare to. |
|
inlinenoexcept |
Determines whether the beginning of this instance of xtd::basic_string matches a specified xtd::basic_string, ignoring or honoring their case.
value | A xtd::basic_string to compare to. |
ignore_case | true to ignore case when comparing the specified basic_string and value; otherwise, false |
|
inlinenoexcept |
Determines whether the end of this basic_string matches the specified basic_string when compared using the specified comparison option.
value | The string to compare to the substring at the end of this instance. |
comparison_type | One of the enumeration values that determines how this basic_string and value are compared. |
|
inline |
Returns a substring [pos
, pos + count
). If the requested substring extends past the end of the string, i.e. the count
is greater than size() - pos (e.g. if count
== xtd::basic_string::npos), the returned substring is [pos
, size()).
pos
, pos + count
) or [pos, size()). `std::out_of_range` | if `pos > size()`. |
basic_string(*this, pos, count);
.
|
inline |
Returns a substring [pos
, pos + count
). If the requested substring extends past the end of the string, i.e. the count
is greater than size() - pos (e.g. if count
== xtd::basic_string::npos), the returned substring is [pos
, size()).
pos | The position of the first character to include. |
pos
, pos + count
) or [pos, size()). `std::out_of_range` | if `pos > size()`. |
basic_string(*this, pos, count);
.
|
inline |
Returns a substring [pos
, pos + count
). If the requested substring extends past the end of the string, i.e. the count
is greater than size() - pos (e.g. if count
== xtd::basic_string::npos), the returned substring is [pos
, size()).
pos | The position of the first character to include. |
count | The length of the substring. |
pos
, pos + count
) or [pos, size()). `std::out_of_range` | if `pos > size()`. |
basic_string(*this, pos, count);
.
|
inline |
Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.
str | basic_string to substring. |
start_index | The zero-based starting character position of a substring in this instance. |
xtd::argument_out_of_range_exception | `start_index` is greater than the length() of this instance. |
|
inline |
Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.
start_index | The zero-based starting character position of a substring in this instance. |
length | The number of characters in the substring. |
xtd::argument_out_of_range_exception | `start_index` plus `length` is greater than the length() of this instance. |
|
noexcept |
Copies the characters in this instance to a Unicode character array.
xtd::array< value_type > xtd::basic_string< char_t, traits_t, allocator_t >::to_array | ( | xtd::size | start_index | ) | const |
Copies the characters in this instance to a Unicode character array starting at specified index.
start_index | The starting position of basic_string to convert. |
xtd::array< value_type > xtd::basic_string< char_t, traits_t, allocator_t >::to_array | ( | xtd::size | start_index, |
xtd::size | length | ||
) | const |
Copies the characters in this instance to a Unicode character array starting at specified index with specified length.
start_index | The starting position of basic_string to convert. |
length | The length of the basic_string to convert |
|
noexcept |
Copies the characters in this instance to a Unicode character array.
xtd::array< value_type > xtd::basic_string< char_t, traits_t, allocator_t >::to_char_array | ( | xtd::size | start_index, |
xtd::size | length | ||
) | const |
Copies the characters in this instance to a Unicode character array starting at specified index with specified length.
start_index | The starting position of basic_string to convert. |
length | The length of the basic_string to convert |
|
inlinenoexcept |
Returns a copy of the current xtd::basic_string converted to lowercase.
|
inlineoverridevirtualnoexcept |
Converts the value of this instance to a xtd::basic_string <char>.
Reimplemented from xtd::object.
|
noexcept |
Converts the current basic_string to title case (except for words that are entirely in uppercase, which are considered to be acronyms).
|
inlinenoexcept |
Converts the value of this instance to a xtd::basic_string <xtd::char16>.
|
inlinenoexcept |
Converts the value of this instance to a xtd::basic_string <xtd::char32>.
|
inlinenoexcept |
Converts the value of this instance to a xtd::basic_string <xtd::char8>.
|
inlinenoexcept |
Returns a copy of the current xtd::basic_string converted to uppercase.
|
inlinenoexcept |
Converts the value of this instance to a xtd::basic_string <xtd::wchar>.
|
inlinenoexcept |
Removes all leading and trailing occurrences of white-space characters from the specified xtd::basic_string.
str | xtd::basic_string to trim end. |
trim_char | A character to remove. |
|
noexcept |
Removes all leading and trailing occurrences of a character specified from the specified xtd::basic_string .
str | xtd::basic_string to trim start. |
trim_char | A character to remove. |
|
noexcept |
Removes all leading and trailing occurrences of a set of characters specified in an array from the specified xtd::basic_string.
str | xtd::basic_string to trim end. |
trim_chars | An array of characters to remove. |
|
inlinenoexcept |
Removes all trailing occurrences of white-space characters from the specified xtd::basic_string.
str | xtd::basic_string to trim end. |
trim_char | A character to remove. |
|
noexcept |
Removes all trailing occurrences of a character specified from the specified xtd::basic_string .
str | xtd::basic_string to trim start. |
trim_char | A character to remove. |
|
noexcept |
Removes all trailing occurrences of a set of characters specified in an array from the specified xtd::basic_string.
str | xtd::basic_string to trim end. |
trim_chars | An array of characters to remove. |
|
inlinenoexcept |
Removes all leading occurrences of white-space characters from the specified xtd::basic_string.
str | xtd::basic_string to trim start. |
trim_char | A character to remove. |
|
noexcept |
Removes all leading occurrences of a character specified from the specified xtd::basic_string .
str | xtd::basic_string to trim start. |
trim_char | A character to remove. |
|
noexcept |
Removes all leading occurrences of a set of characters specified in an array from the specified xtd::basic_string.
str | An xtd::basic_string to trim start. |
trim_chars | An array of characters to remove. |
|
inlinestatic |
Gets the class name of the object_t.
|
inlinestatic |
Gets the class name of the specified object.
|
inlinestatic |
Gets the class name of the specified object.
|
inlinestaticnoexcept |
Compares two specified basic_string objects and returns an integer that indicates their relative position in the sort order.
str_a | The first basic_string to compare. |
str_b | The second basic_string to compare. |
Value | Condition |
---|---|
Less than zero | str_a precedes str_b in the sort order. |
Zero | str_a occurs in the same position as str_b in the sort order. |
Greater than zero | str_a follows str_b in the sort order. |
|
inlinestaticnoexcept |
Compares two specified basic_string objects, ignoring or honoring their case, and returns an integer that indicates their relative position in the sort order.
str_a | The first basic_string to compare. |
str_b | The second basic_string to compare. |
ignore_case | true to ignore case during the comparison; otherwise, false. |
Value | Condition |
---|---|
Less than zero | str_a precedes str_b in the sort order. |
Zero | str_a occurs in the same position as str_b in the sort order. |
Greater than zero | str_a follows str_b in the sort order. |
|
inlinestaticnoexcept |
Compares two specified basic_string objects using the specified rules, and returns an integer that indicates their relative position in the sort order.
str_a | The first basic_string to compare. |
str_b | The second basic_string to compare. |
comparison_type | One of the enumeration values that specifies the rules to use in the comparison. |
Value | Condition |
---|---|
Less than zero | str_a precedes str_b in the sort order. |
Zero | str_a occurs in the same position as str_b in the sort order. |
Greater than zero | str_a follows str_b in the sort order. |
|
inlinestatic |
Compares substrings of two specified basic_string objects and returns an integer that indicates their relative position in the sort order.
str_a | The first basic_string to use in the comparison. |
index_a | The position of the substring within str_a. |
str_b | The second basic_string to use in the comparison. |
index_b | The position of the substring within str_b. |
length | The maximum number of characters in the substrings to compare |
Value | Condition |
---|---|
Less than zero | str_a precedes str_b in the sort order. |
Zero | str_a occurs in the same position as str_b in the sort order. |
Greater than zero | str_a follows str_b in the sort order. |
|
inlinestatic |
Compares substrings of two specified basic_string objects, ignoring or honoring their case, and returns an integer that indicates their relative position in the sort order.
str_a | The first basic_string to use in the comparison. |
index_a | The position of the substring within str_a. |
str_b | The second basic_string to use in the comparison. |
index_b | The position of the substring within str_b. |
length | The maximum number of characters in the substrings to compare |
ignore_case | true to ignore case during the comparison; otherwise, false. |
Value | Condition |
---|---|
Less than zero | str_a precedes str_b in the sort order. |
Zero | str_a occurs in the same position as str_b in the sort order. |
Greater than zero | str_a follows str_b in the sort order. |
|
inlinestatic |
Compares substrings of two specified basic_string objects using the specified rules, and returns an integer that indicates their relative position in the sort order.
str_a | The first basic_string to use in the comparison. |
index_a | The position of the substring within str_a. |
str_b | The second basic_string to use in the comparison. |
index_b | The position of the substring within str_b. |
length | The maximum number of characters in the substrings to compare |
comparison_type | One of the enumeration values that specifies the rules to use in the comparison. |
Value | Condition |
---|---|
Less than zero | str_a precedes str_b in the sort order. |
Zero | str_a occurs in the same position as str_b in the sort order. |
Greater than zero | str_a follows str_b in the sort order. |
|
inlinestaticnoexcept |
Concatenates four specified instances of basic_string.
str_a | The first basic_string to concatenate. |
str_b | The second basic_string to concatenate. |
str_c | The third basic_string to concatenate. |
str_d | The fourth basic_string to concatenate. |
|
inlinestaticnoexcept |
Concatenates four specified instances of object.
obj_a | The first object to concatenate. |
obj_b | The second object to concatenate. |
obj_c | The third object to concatenate. |
obj_d | The fourth object to concatenate. |
|
inlinestaticnoexcept |
Concatenates three specified instances of basic_string.
str_a | The first basic_string to concatenate. |
str_b | The second basic_string to concatenate. |
str_c | The third basic_string to concatenate. |
|
inlinestaticnoexcept |
Concatenates three specified instances of object.
obj_a | The first object to concatenate. |
obj_b | The second object to concatenate. |
obj_c | The third object to concatenate. |
|
inlinestaticnoexcept |
Concatenates two specified instances of basic_string.
str_a | The first basic_string to concatenate. |
str_b | The second basic_string to concatenate. |
|
inlinestaticnoexcept |
Concatenates two specified instances of object.
obj_a | The first object to concatenate. |
obj_b | The second object to concatenate. |
|
staticnoexcept |
Concatenates the elements of a specified basic_string array.
values | An array of basic_string instances. |
|
staticnoexcept |
Concatenates the basic_string representations of the elements in a specified object array.
args | An object array that contains the elements to concatenate. |
|
inlinestaticnoexcept |
Creates the basic_string representation of a specified object.
value | The object to represent. |
|
inlinestatic |
Gets demangled basic_string of name,.
name | The name to demangle. |
|
inlinestaticnoexcept |
Determines whether two specified xtd::basic_string objects have the same value.
a | The first basic_string to compare. |
b | The second basic_string to compare. |
true
if the value of a
is the same as the value of b
; otherwise, false
.
|
inlinestaticnoexcept |
Determines whether two specified xtd::basic_string objects have the same value.
a | The first basic_string to compare. |
b | The second basic_string to compare. |
true
if the value of a
is the same as the value of b
; otherwise, false
.
|
inlinestaticnoexcept |
Determines whether two specified xtd::basic_string objects have the same value, ignoring or honoring their case.
a | The first basic_string to compare. |
b | The second basic_string to compare. |
ignore_case | true to ignore case when comparing this instance and value; otherwise, false |
true
if the value of a
is the same as the value of b
; otherwise, false
.
|
inlinestaticnoexcept |
Determines whether two specified xtd::basic_string objects have the same value, ignoring or honoring their case.
a | The first basic_string to compare. |
b | The second basic_string to compare. |
ignore_case | true to ignore case when comparing this instance and value; otherwise, false |
true
if the value of a
is the same as the value of b
; otherwise, false
.
|
inlinestatic |
Gets the fully qualified class name of the objec_t, including the namespace of the objec_t.
|
inlinestatic |
Gets the fully qualified class name of the specified object, including the namespace of the specified object.
|
inlinestatic |
Gets the fully qualified class name of the specified object, including the namespace of the specified object.
|
inlinestaticnoexcept |
Indicates whether the specifeid basic_string is an empty basic_string ("").
string | The xtd::basic_string to check if empty. |
|
inlinestaticnoexcept |
Concatenates a specified separator basic_string between each element of a specified object array, yielding a single concatenated basic_string.
separator | A basic_string separator. |
values | An array of Object. |
|
inlinestatic |
Concatenates a specified separator basic_string between each element of a specified object array, yielding a single concatenated basic_string.
separator | A basic_string separator. |
values | An array of Object. |
start_index | The first array element in value to use. |
|
inlinestatic |
Concatenates a specified separator basic_string between each element of a specified Object array, yielding a single concatenated basic_string.
separator | A basic_string separator. |
values | An array of Object. |
start_index | The first array element in value to use. |
count | The number of elements of value to use. |
|
inlinestatic |
Converts a basic_string into a value_t type.
str | Ax xtd::basic_string to convert to value_t |
|
inlinestaticnoexcept |
Try to convert a basic_string into a value_t type.
str | An xtd::basic_string to convert to value_t |
value | The value that will contain the parsed xtd::basic_string. |
|
inline |
Returns a reference to the character at specified location index.
index | The position of the character to return. |
xtd::index_out_of_range_exception | If `index` is not within the range of the string. |
|
inlinenoexcept |
Returns a reference to the underlying base type.
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str.
str | String to use as data source. |
|
inlinenoexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in str
is moved from str
into this string). str
is in a valid but unspecified state afterwards.
str | String to use as data source. |
|
inlinenoexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in str
is moved from str
into this string). str
is in a valid but unspecified state afterwards.
str | String to use as data source. |
|
inlinenoexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in str
is moved from str
into this string). str
is in a valid but unspecified state afterwards.
str | String to use as data source. |
|
inlinenoexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in str
is moved from str
into this string). str
is in a valid but unspecified state afterwards.
str | String to use as data source. |
|
inlinenoexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in str
is moved from str
into this string). str
is in a valid but unspecified state afterwards.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String to use as data source. |
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String litteral pointer to use as data source. |
xtd::tring_null_pointer_exception | The `str` is null. |
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String litteral pointer to use as data source. |
xtd::tring_null_pointer_exception | The `str` is null. |
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String litteral pointer to use as data source. |
xtd::tring_null_pointer_exception | The `str` is null. |
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String litteral pointer to use as data source. |
xtd::tring_null_pointer_exception | The `str` is null. |
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of str
.
str | String litteral pointer to use as data source. |
xtd::tring_null_pointer_exception | The `str` is null. |
|
inline |
Copy assignment operator. Replaces the contents with the specified character.
character | The character to use as data source. |
|
inline |
Copy assignment operator. Replaces the contents with the specified character.
character | The character to use as data source. |
|
inline |
Copy assignment operator. Replaces the contents with the specified character.
character | The character to use as data source. |
|
inline |
Copy assignment operator. Replaces the contents with the specified character.
character | The character to use as data source. |
|
inline |
Copy assignment operator. Replaces the contents with the specified character.
character | The character to use as data source. |
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of the specified initializer list.
il | The initialiazer list to use as data source. |
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of the specified initializer list.
il | The initialiazer list to use as data source. |
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of the specified initializer list.
il | The initialiazer list to use as data source. |
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of the specified initializer list.
il | The initialiazer list to use as data source. |
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of the specified initializer list.
il | The initialiazer list to use as data source. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
str | string to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
ch | Character value to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
ch | Character value to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
ch | Character value to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
ch | Character value to append. |
|
inline |
Addition assignment operator. Appends additional characters to the string.
ch | Character value to append. |
|
static |
Represents the empty basic_string.
|
inlinestaticconstexpr |
This is a special value equal to the maximum value representable by the type xtd::size.