Represents a mutable string of characters. This class cannot be inherited.
Public Aliases | |
| using | base_type |
| Represents the basic string base type. | |
| using | traits_type |
| Represents the basic string traits type. | |
| using | value_type |
| Represents the basic string value type. | |
| using | allocator_type |
| Represents the basic string allocator type. | |
| using | size_type |
| Represents the basic string size type. | |
| using | difference_type |
| Represents the basic string difference type. | |
| using | reference |
| Represents the basic string referecne type. | |
| using | const_reference |
| Represents the basic string const referecne type. | |
| using | pointer |
| Represents the basic string pointer type. | |
| using | const_pointer |
| Represents the basic string const pointer type. | |
| using | iterator |
| Represents the basic string iterator type. | |
| using | const_iterator |
| Represents the basic string const iterator type. | |
| using | reverse_iterator |
| Represents the basic string reverse iterator type. | |
| using | const_reverse_iterator |
| Represents the basic string const reverse iterator type. | |
Public Fields | |
| static constexpr size_type | npos |
| Represents a value that is not a valid position in a collection. | |
| static constexpr xtd::size | bpos |
| Represents the index of the first valid element in a collection. | |
| static constexpr xtd::size | epos |
| Represents the index of the last valid element in a collection. | |
Public Constructors | |
| basic_string_builder ()=default | |
| Initializes a new instance of xtd::text::basic_string_builder. | |
| basic_string_builder (xtd::size capacity) | |
| Initializes a new instance of the xtd::text::basic_string_builder class using the specified capacity. | |
| basic_string_builder (xtd::size capacity, xtd::size max_capacity) | |
| Initializes a new instance of the xtd::text::basic_string_builder class that starts with a specified capacity and can grow to a specified maximum. | |
| basic_string_builder (const xtd::basic_string< value_type > &value) | |
| Initializes a new instance of the xtd::text::basic_string_builder class using the specified string. | |
| basic_string_builder (const xtd::basic_string< value_type > &value, xtd::size capacity) | |
| Initializes a new instance of the xtd::text::basic_string_builder class using the specified string and capacity. | |
| basic_string_builder (const xtd::basic_string< value_type > &value, xtd::size start_index, xtd::size length, xtd::size capacity) | |
| Initializes a new instance of the xtd::text::basic_string_builder class from the specified substring and capacity. | |
| basic_string_builder (const allocator_type &allocator) noexcept | |
| Initializes a new instance of xtd::text::basic_string_builder with specified allocator. | |
| basic_string_builder (const basic_string_builder &str) noexcept | |
| Initializes a new instance of xtd::text::basic_string_builder with specified string to copy. | |
| basic_string_builder (const basic_string_builder &str, const allocator_type &allocator) noexcept | |
| Initializes a new instance of xtd::text::basic_string_builder with specified string to copy and allocator. | |
| basic_string_builder (const basic_string_builder &str, xtd::size index) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified substring at index. | |
| basic_string_builder (const basic_string_builder &str, xtd::size index, const allocator_type &allocator) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified substring at index and allocator. | |
| basic_string_builder (const basic_string_builder &str, xtd::size index, xtd::size count) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified substring at index and count characters. | |
| basic_string_builder (const basic_string_builder &str, xtd::size index, xtd::size count, const allocator_type &allocator) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified substring at index, count characters and allocator. | |
| basic_string_builder (basic_string_builder &&str) noexcept | |
| Initializes a new instance of xtd::text::basic_string_builder with specified string to move. | |
| basic_string_builder (basic_string_builder &&str, const allocator_type &allocator) noexcept | |
| Initializes a new instance of xtd::text::basic_string_builder with specified string to move and allocator. | |
| basic_string_builder (xtd::size count, value_type character) | |
| basic_string_builder (xtd::size count, value_type character, const allocator_type &allocator) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified count copies of character and specified allocator. | |
| basic_string_builder (value_type character, xtd::size count) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified count copies of character. | |
| basic_string_builder (value_type character, xtd::size count, const allocator_type &allocator) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified count copies of character and specified allocator. | |
| basic_string_builder (const_pointer str) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified string to copy. | |
| basic_string_builder (const_pointer str, const allocator_type &allocator) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified string to copy, and allocator. | |
| basic_string_builder (const_pointer str, xtd::size count) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified substring and count characters. | |
| basic_string_builder (const_pointer str, xtd::size count, const allocator_type &allocator) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified substring, count characters and allocator. | |
| basic_string_builder (const std::basic_string< value_type > &str) noexcept | |
| Initializes a new instance of xtd::text::basic_string_builder with specified string to copy. | |
| basic_string_builder (const std::basic_string< value_type > &str, const allocator_type &allocator) noexcept | |
| Initializes a new instance of xtd::text::basic_string_builder with specified string to copy and allocator. | |
| template<class input_iterator_t> | |
| basic_string_builder (input_iterator_t first, input_iterator_t last) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified first and last iterators of substring. | |
| template<class input_iterator_t> | |
| basic_string_builder (input_iterator_t first, input_iterator_t last, const allocator_type &allocator) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified first and last iterators of substring and allocator. | |
| basic_string_builder (std::initializer_list< value_type > il) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified initializer list. | |
| basic_string_builder (std::initializer_list< value_type > il, const allocator_type &allocator) | |
| Initializes a new instance of xtd::text::basic_string_builder with specified initializer list and allocator. | |
Public Properties | |
| auto | begin () const -> const_iterator |
| Returns an iterator to the first character of the string. | |
| auto | begin () -> iterator |
| Returns an iterator to the first character of the string. | |
| auto | c_str () const noexcept -> const_pointer |
| Returns a pointer to a null-terminated character array with data equivalent to those stored in the string. | |
| auto | capacity () const noexcept -> size_type |
| Returns the number of characters that the string has currently allocated space for. | |
| auto | capacity (size_type value) -> basic_string_builder & |
| Sets the number of characters that the string has currently allocated space for. | |
| auto | cbegin () const -> const_iterator |
| Returns an iterator to the first character of the string. | |
| auto | chars () const noexcept -> const base_type & |
| Returns a reference to the underlying base type. | |
| auto | chars () noexcept -> base_type & |
| Returns a reference to the underlying base type. | |
| auto | cend () const -> const_iterator |
| 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. | |
| auto | data () const noexcept -> const_pointer |
| 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. | |
| auto | data () noexcept -> pointer |
| 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. | |
| auto | empty () const noexcept -> bool |
| Checks if the string has no characters, i.e. whether begin() == end(). | |
| auto | end () const -> const_iterator |
| 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. | |
| auto | end () -> iterator |
| 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. | |
| auto | length () const noexcept -> size_type |
| Gets or sets the length of the current xtd::text::basic_string_builder object. | |
| auto | length (size_type value) noexcept -> basic_string_builder & |
| Sets or sets the length of the current xtd::text::basic_string_builder object. | |
| auto | max_capacity () const noexcept -> size_type |
| Returns the number of characters that the string has currently allocated space for. | |
| auto | size () const noexcept -> size_type |
| Returns the number of char_t elements in the string, i.e. std::distance(begin(), end()). | |
Public Methods | |
| auto | append (const xtd::basic_string< char_t > &value) -> basic_string_builder & |
| Appends a copy of the specified string to this instance. | |
| auto | append (const xtd::basic_string< char_t > &value, size_type start_index, size_type count) -> basic_string_builder & |
| Appends a copy of a specified substring to this instance. | |
| auto | append (xtd::boolean value) -> basic_string_builder & |
| Appends the string representation of a specified boolean value to this instance. | |
| auto | append (xtd::byte value) -> basic_string_builder & |
| Appends the string representation of a specified 8-bit unsigned value to this instance. | |
| auto | append (xtd::decimal value) -> basic_string_builder & |
| Appends the string representation of a specified decimal value to this instance. | |
| auto | append (double value) -> basic_string_builder & |
| Appends the string representation of a specified double value to this instance. | |
| auto | append (xtd::single value) -> basic_string_builder & |
| Appends the string representation of a specified single value to this instance. | |
| auto | append (xtd::int16 value) -> basic_string_builder & |
| Appends the string representation of a specified 16-bit signed integer value to this instance. | |
| auto | append (xtd::int32 value) -> basic_string_builder & |
| Appends the string representation of a specified 32-bit signed integer value to this instance. | |
| auto | append (xtd::int64 value) -> basic_string_builder & |
| Appends the string representation of a specified 64-bit signed integer value to this instance. | |
| auto | append (xtd::sbyte value) -> basic_string_builder & |
| Appends the string representation of a specified 8-bit signed integer value to this instance. | |
| auto | append (xtd::uint16 value) -> basic_string_builder & |
| Appends the string representation of a specified 16-bit unsigned integer value to this instance. | |
| auto | append (xtd::uint32 value) -> basic_string_builder & |
| Appends the string representation of a specified 32-bit unsigned integer value to this instance. | |
| auto | append (xtd::uint64 value) -> basic_string_builder & |
| Appends the string representation of a specified 64-bit unsigned integer value to this instance. | |
| auto | append (value_type value) -> basic_string_builder & |
| Appends the string representation of a specified xtd::text::basic_string_builder::value_type value to this instance. | |
| auto | append (value_type value, size_type repeat_count) -> basic_string_builder & |
| Appends a specified number of copies of the string representation of a Unicode character to this instance. | |
| template<class object_t> | |
| auto | append (object_t value) -> basic_string_builder & |
| Appends the string representation of a specified object to this instance. | |
| auto | append (size_type count, value_type ch) -> basic_string_builder & |
| Appends additional characters to the string. | |
| auto | append (const basic_string_builder &str) -> basic_string_builder & |
| Appends additional characters to the string. | |
| auto | append (const basic_string_builder &str, size_type pos) -> basic_string_builder & |
| Appends additional characters to the string. | |
| auto | append (const basic_string_builder &str, size_type pos, size_type count) -> basic_string_builder & |
| Appends additional characters to the string. | |
| auto | append (const_pointer s, size_type count) -> basic_string_builder & |
| Appends additional characters to the string. | |
| auto | append (const_pointer s) -> basic_string_builder & |
| Appends additional characters to the string. | |
| template<class input_iterator_t> | |
| auto | append (input_iterator_t first, input_iterator_t last) -> basic_string_builder & |
| Appends additional characters to the string. | |
| auto | append (std::initializer_list< value_type > ilist) -> basic_string_builder & |
| Appends additional characters to the string. | |
| template<class ... args_t> | |
| auto | append_format (const xtd::basic_string< char_t > &format, args_t &&... args) -> basic_string_builder & |
| Appends the string returned by processing a composite format string, which contains zero or more format items, to this instance. Each format item is replaced by the string representation of a corresponding argument in a parameters. | |
| template<class collection_t> | |
| auto | append_join (const xtd::basic_string< char_t > &separator, const collection_t &values) -> basic_string_builder & |
| Concatenates and appends the members of a collection, using the specified separator between each member. | |
| template<class collection_t> | |
| auto | append_join (value_type separator, const collection_t &values) -> basic_string_builder & |
| Concatenates and appends the members of a collection, using the specified xtd::basic_string_builder::value_type separator between each member. | |
| auto | append_line () -> basic_string_builder & |
| Appends the default line terminator to the end of the current xtd::text::basic_string_builder object. | |
| auto | append_line (const xtd::basic_string< char_t > &value) -> basic_string_builder & |
| Appends a copy of the specified string followed by the default line terminator to the end of the current xtd::text::basic_string_builder object. | |
| auto | clear () -> basic_string_builder & |
| Removes all characters from the current xtd::text::basic_string_builder instance. | |
| auto | copy_to (xtd::size source_index, xtd::array< value_type > &destination, xtd::size destination_index, xtd::size destination_count) const -> void |
| Copies the characters from a specified segment of this instance to a specified segment of a destination xtd::text::basic_string_builder::value_type array. | |
| auto | equals (const object &obj) const noexcept -> bool override |
| Determines whether this instance and a specified object, which must also be a xtd::text::basic_string_builder object, have the same value. | |
| auto | equals (const basic_string_builder &value) const noexcept -> bool override |
| Determines whether this instance and another specified xtd::text::basic_string_builder object have the same value. | |
| auto | ensure_capacity (size_type capacity) -> size_type |
| Ensures that the capacity of this instance of xtd::text::basic_string_builder is at least the specified value. | |
| virtual auto | get_base_type () const noexcept -> const base_type & |
| Returns the underlying base type. | |
| auto | get_hash_code () const noexcept -> xtd::size override |
| Returns the hash code for this basic_string_builder. | |
| auto | insert (size_type index, const xtd::basic_string< char_t > &value) -> basic_string_builder & |
| Inserts a string into this instance at the specified character position. | |
| auto | insert (size_type index, const xtd::basic_string< char_t > &value, size_type count) -> basic_string_builder & |
| Inserts one or more copies of a specified string into this instance at the specified character position. | |
| auto | insert (size_type index, xtd::boolean value) -> basic_string_builder & |
| Inserts the string representation of a boolean value into this instance at the specified character position. | |
| auto | insert (size_type index, xtd::byte value) -> basic_string_builder & |
| Inserts the string representation of a specified 8-bit unsigned integer into this instance at the specified character position. | |
| auto | insert (size_type index, xtd::decimal value) -> basic_string_builder & |
| Inserts the string representation of a specified 8decimal into this instance at the specified character position. | |
| auto | insert (size_type index, double value) -> basic_string_builder & |
| Inserts the string representation of a specified double into this instance at the specified character position. | |
| auto | insert (size_type index, xtd::single value) -> basic_string_builder & |
| Inserts the string representation of a specified single into this instance at the specified character position. | |
| auto | insert (size_type index, xtd::int16 value) -> basic_string_builder & |
| Inserts the string representation of a specified 16-bit signed integer into this instance at the specified character position. | |
| auto | insert (size_type index, xtd::int32 value) -> basic_string_builder & |
| Inserts the string representation of a specified 32-bit signed integer into this instance at the specified character position. | |
| auto | insert (size_type index, xtd::int64 value) -> basic_string_builder & |
| Inserts the string representation of a specified 64-bit signed integer into this instance at the specified character position. | |
| auto | insert (size_type index, xtd::sbyte value) -> basic_string_builder & |
| Inserts the string representation of a specified 8-bit signed integer into this instance at the specified character position. | |
| auto | insert (size_type index, xtd::uint16 value) -> basic_string_builder & |
| Inserts the string representation of a specified 16-bit unsigned integer into this instance at the specified character position. | |
| auto | insert (size_type index, xtd::uint32 value) -> basic_string_builder & |
| Inserts the string representation of a specified 32-bit unsigned integer into this instance at the specified character position. | |
| auto | insert (size_type index, xtd::uint64 value) -> basic_string_builder & |
| Inserts the string representation of a specified 64-bit unsigned integer into this instance at the specified character position. | |
| auto | insert (size_type index, value_type value) -> basic_string_builder & |
| Inserts the string representation of a specified Unicode character into this instance at the specified character position. | |
| auto | insert (size_type index, value_type value, size_type repeat_count) -> basic_string_builder & |
| Inserts a specified number of copies of the string representation of a Unicode character to this instance at the specified character position. | |
| template<class object_t> | |
| auto | insert (size_type index, object_t value) -> basic_string_builder & |
| Inserts the string representation of a specified object into this instance at the specified character position. | |
| auto | insert (size_type index, size_type count, value_type ch) -> basic_string_builder & |
| Inserts characters into the string. | |
| auto | insert (size_type index, const_pointer s, size_type count) -> basic_string_builder & |
| Inserts characters into the string. | |
| auto | insert (size_type index, const basic_string_builder &str) -> basic_string_builder & |
| Inserts characters into the string. | |
| auto | remove (size_type start_index, size_type length) -> basic_string_builder & |
| Inserts characters into the string. | |
| auto | replace (value_type old_char, value_type new_char) noexcept -> basic_string_builder & |
| Replaces all occurrences of a specified character in this instance with another specified character. | |
| auto | replace (value_type old_char, value_type new_char, size_type start_index, size_type count) -> basic_string_builder & |
| Replaces, within a substring of this instance, all occurrences of a specified character with another specified character. | |
| auto | replace (size_type pos, size_type count, const basic_string_builder &str) -> basic_string_builder & |
| Replaces all occurrences of a specified string in this instance with another specified string. | |
| auto | replace (size_type pos, size_type count, const basic_string_builder &str, size_type pos2) -> basic_string_builder & |
| Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters. | |
| auto | replace (size_type pos, size_type count, const basic_string_builder &str, size_type pos2, size_type count2) -> basic_string_builder & |
| Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters. | |
| auto | replace (size_type pos, size_type count, const_pointer cstr, size_type count2) -> basic_string_builder & |
| Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters. | |
| auto | replace (size_type pos, size_type count, const_pointer cstr) -> basic_string_builder & |
| Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters. | |
| auto | replace (size_type pos, size_type count, size_type count2, value_type ch) -> basic_string_builder & |
| Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters. | |
| auto | to_string () const noexcept -> xtd::string override |
| Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters. | |
Public Operators | |
| auto | operator[] (xtd::size index) const -> const_reference |
| Returns a reference to the character at specified location index. | |
| auto | operator[] (xtd::size index) -> reference |
| Returns a reference to the character at specified location index. | |
| operator const base_type & () const noexcept | |
| Returns a reference to the underlying base type. | |
| operator base_type & () noexcept | |
| Returns a reference to the underlying base type. | |
| auto | operator= (const basic_string_builder &str) noexcept -> basic_string_builder & |
| Copy assignment operator. Replaces the contents with a copy of the contents of str. | |
| auto | operator= (basic_string_builder &&str) noexcept -> basic_string_builder & |
| 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. | |
| auto | operator= (const std::basic_string< value_type > &str) noexcept -> basic_string_builder & |
| Copy assignment operator. Replaces the contents with a copy of the contents of str. | |
| auto | operator= (std::basic_string< value_type > &&str) noexcept -> basic_string_builder & |
| Copy assignment operator. Replaces the contents with a copy of the contents of str. | |
| auto | operator= (const xtd::basic_string< value_type > &str) noexcept -> basic_string_builder & |
| Copy assignment operator. Replaces the contents with a copy of the contents of str. | |
| auto | operator= (xtd::basic_string< value_type > &&str) noexcept -> basic_string_builder & |
| Copy assignment operator. Replaces the contents with a copy of the contents of str. | |
| auto | operator= (const_pointer str) -> basic_string_builder & |
| Copy assignment operator. Replaces the contents with a copy of the contents of str. | |
| auto | operator= (value_type character) -> basic_string_builder & |
| Copy assignment operator. Replaces the contents with the specified character. | |
| auto | operator= (const std::initializer_list< value_type > &il) -> basic_string_builder & |
| Copy assignment operator. Replaces the contents with a copy of the contents of the specified initializer list. | |
| auto | operator+= (const basic_string_builder &str) -> basic_string_builder & |
| Addition assignment operator. Appends additional characters to the string. | |
| auto | operator+= (basic_string_builder &&str) -> basic_string_builder & |
| Addition assignment operator. Appends additional characters to the string. | |
| auto | operator+= (const_pointer str) -> basic_string_builder & |
| Addition assignment operator. Appends additional characters to the string. | |
| auto | operator+= (value_type ch) -> basic_string_builder & |
| Addition assignment operator. Appends additional characters to the string. | |
Additional Inherited Members | |
| 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<class object_t> | |
| xtd::unique_ptr_object< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object. | |
| virtual bool | equals (const type_t &) const noexcept=0 |
| Indicates whether the current object is equal to another object of the same type. | |
| template<class object_a_t, class 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<class object_a_t, class 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::text::basic_string_builder< char_t, traits_t, allocator_t >::base_type |
Represents the basic string base type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::traits_type |
Represents the basic string traits type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::value_type |
Represents the basic string value type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::allocator_type |
Represents the basic string allocator type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::size_type |
Represents the basic string size type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::difference_type |
Represents the basic string difference type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::reference |
Represents the basic string referecne type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::const_reference |
Represents the basic string const referecne type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::pointer |
Represents the basic string pointer type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::const_pointer |
Represents the basic string const pointer type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::iterator |
Represents the basic string iterator type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::const_iterator |
Represents the basic string const iterator type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::reverse_iterator |
Represents the basic string reverse iterator type.
| using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::const_reverse_iterator |
Represents the basic string const reverse iterator type.
|
default |
Initializes a new instance of xtd::text::basic_string_builder.
|
inline |
Initializes a new instance of the xtd::text::basic_string_builder class using the specified capacity.
| capacity | The suggested starting size of this instance. |
| argument_out_of_range_exception | `capacity` is greater than xtd::text::basic_string_builder::max_capacity. |
|
inline |
Initializes a new instance of the xtd::text::basic_string_builder class that starts with a specified capacity and can grow to a specified maximum.
| capacity | The suggested starting size of the xtd::text::basic_string_builder.. |
| max_capacity | The maximum number of characters the current string can contain. |
| xtd::argument_out_of_range_exception | `capacity` is greater than `max_capacity`. |
|
inline |
Initializes a new instance of the xtd::text::basic_string_builder class using the specified string.
| value | The string used to initialize the value of the instance. |
|
inline |
Initializes a new instance of the xtd::text::basic_string_builder class using the specified string and capacity.
| value | The string used to initialize the value of the instance. |
| capacity | The suggested starting size of the xtd::text::basic_string_builder. |
|
inline |
Initializes a new instance of the xtd::text::basic_string_builder class from the specified substring and capacity.
| value | The string that contains the substring used to initialize the value of this instance. |
| start_index | The position within value where the substring begins. |
| length | The number of characters in the substring. |
| capacity | The suggested starting size of the xtd::text::basic_string_builder. |
| xtd::argument_out_of_range_exception | `start_index` plus `length` is not a position within `value`. |
|
inlineexplicitnoexcept |
Initializes a new instance of xtd::text::basic_string_builder with specified allocator.
| allocator | The allocator to use for all memory allocations of this basic_string_builder. |
|
inlinenoexcept |
Initializes a new instance of xtd::text::basic_string_builder with specified string to copy.
| str | The string to copy. |
|
inlinenoexcept |
Initializes a new instance of xtd::text::basic_string_builder 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_builder. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder with specified substring at index.
| str | The string to copy. |
| index | The index of the first substring character where start copy. |
| xtd::index_out_of_range_exception | `index` is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder 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_builder. |
| xtd::index_out_of_range_exception | `index` is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder 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::index_out_of_range_exception | `index` + `count`is greater or equal than `str` size. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder 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_builder. |
| xtd::index_out_of_range_exception | `index` + `count`is greater or equal than `str` size. |
|
inlinenoexcept |
Initializes a new instance of xtd::text::basic_string_builder with specified string to move.
| str | The basic_string_builder to move. |
|
inlinenoexcept |
Initializes a new instance of xtd::text::basic_string_builder with specified string to move and allocator.
| str | The basic_string_builder to move. |
| allocator | The allocator to use for all memory allocations of this basic_string_builder. |
|
inline |
| str | The string to copy. |
| count | The number of copies of character. |
| character | The character copied. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder 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_builder. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder with specified count copies of character.
| character | The character copied. |
| count | The number of copies of character. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder 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_builder. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder with specified string to copy.
| str | The string to copy. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder 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_builder. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder with specified substring and count characters.
| count | The number of substring characters to copy. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder 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_builder. |
|
inlinenoexcept |
Initializes a new instance of xtd::text::basic_string_builder with specified string to copy.
| str | The string to copy. |
|
inlinenoexcept |
Initializes a new instance of xtd::text::basic_string_builder 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_builder. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder with specified first and last iterators of substring.
|
inline |
Initializes a new instance of xtd::text::basic_string_builder 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_builder. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder with specified initializer list.
| il | The initializer list to fill. |
|
inline |
Initializes a new instance of xtd::text::basic_string_builder 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_builder. |
|
inlinenodiscard |
Returns an iterator to the first character of the string.
|
inlinenodiscard |
Returns an iterator to the first character of the string.
|
inlinenodiscardnoexcept |
Returns a pointer to a null-terminated character array with data equivalent to those stored in the string.
|
inlinenodiscardnoexcept |
Returns the number of characters that the string has currently allocated space for.
|
inline |
Sets the number of characters that the string has currently allocated space for.
| value | Capacity of the currently allocated storage, i.e. the storage available for storing elements. |
|
inlinenodiscard |
Returns an iterator to the first character of the string.
|
inlinenodiscardnoexcept |
Returns a reference to the underlying base type.
|
inlinenodiscardnoexcept |
Returns a reference to the underlying base type.
|
inlinenodiscard |
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.
|
inlinenodiscardnoexcept |
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.
|
inlinenodiscardnoexcept |
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.
|
inlinenodiscardnoexcept |
|
inlinenodiscard |
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.
|
inlinenodiscard |
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.
|
inlinenodiscardnoexcept |
Gets or sets the length of the current xtd::text::basic_string_builder object.
|
inlinenoexcept |
Sets or sets the length of the current xtd::text::basic_string_builder object.
| value | The length of this instance. |
| xtd::argument_out_of_range_exception | The value specified for a set operation is less than zero or greater than xtd::text::basic_string_builder::max_capacity. |
|
inlinenodiscardnoexcept |
Returns the number of characters that the string has currently allocated space for.
|
inlinenodiscardnoexcept |
|
inline |
Appends a copy of the specified string to this instance.
| value | The string to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends a copy of a specified substring to this instance.
| value | The string that contains the substring to append. |
| start_index | The starting position of the substring within value. |
| count | The number of characters in value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. -or- `start_index` + `count` is greater than the length of `value`. |
|
inline |
Appends the string representation of a specified boolean value to this instance.
| value | The boolean value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified 8-bit unsigned value to this instance.
| value | The 8-bit unsigned value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified decimal value to this instance.
| value | The decimal value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified double value to this instance.
| value | The double value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified single value to this instance.
| value | The single value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified 16-bit signed integer value to this instance.
| value | The 16-bit signed value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified 32-bit signed integer value to this instance.
| value | The 32-bit signed value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified 64-bit signed integer value to this instance.
| value | The 64-bit signed value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified 8-bit signed integer value to this instance.
| value | The 8-bit signed integer value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified 16-bit unsigned integer value to this instance.
| value | The 16-bit unsigned value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified 32-bit unsigned integer value to this instance.
| value | The 32-bit unsigned value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified 64-bit unsigned integer value to this instance.
| value | The 64-bit unsigned value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified xtd::text::basic_string_builder::value_type value to this instance.
| value | The xtd::text::basic_string_builder::value_type value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends a specified number of copies of the string representation of a Unicode character to this instance.
| value | The character to append. |
| repeat_count | The number of times to append value. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string representation of a specified object to this instance.
| object_t | The type of object to append. |
| value | The object to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends additional characters to the string.
| count | The number of characters to append. |
| ch | The character value to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends additional characters to the string.
| str | The string to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends additional characters to the string.
| str | The string to append. |
| pos | The index of the first character to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends additional characters to the string.
| str | The string to append. |
| pos | The index of the first character to append. |
| count | The number of characters to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends additional characters to the string.
| s | The pointer to the character string to append. |
| count | The number of characters to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends additional characters to the string.
| s | The pointer to the character string to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends additional characters to the string.
| first | The first iterator of the range of characters to append. |
| last | The last iterator of the range of characters to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends additional characters to the string.
| ilist | The initializer list with the characters to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the string returned by processing a composite format string, which contains zero or more format items, to this instance. Each format item is replaced by the string representation of a corresponding argument in a parameters.
| ...args_t | Types of the values to format. |
| format | A composite format string. |
| args | Arguments to format. |
| xtd::format_exception | `format` is invalid. |
| Element | Description |
|---|---|
| index | The optional zero-based position in the parameter list of the object to be formatted. If there is no parameter in the index position, a xtd::format_exception is thrown. |
| length | The minimum number of characters in the string representation of the parameter. If positive, the parameter is right-aligned; if negative, it is left-aligned. |
| :format_string | A standard or custom format string that is supported by the parameter. |
|
inline |
Concatenates and appends the members of a collection, using the specified separator between each member.
| separator | The string to use as a separator. separator is included in the concatenated and appended strings only if values has more than one element. |
| values | A collection that contains the objects to concatenate and append to the current instance of the string builder. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Concatenates and appends the members of a collection, using the specified xtd::basic_string_builder::value_type separator between each member.
| separator | The xtd::basic_string_builder::value_type to use as a separator. separator is included in the concatenated and appended strings only if values has more than one element. |
| values | A collection that contains the objects to concatenate and append to the current instance of the string builder. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends the default line terminator to the end of the current xtd::text::basic_string_builder object.
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Appends a copy of the specified string followed by the default line terminator to the end of the current xtd::text::basic_string_builder object.
| value | The string to append. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Removes all characters from the current xtd::text::basic_string_builder instance.
|
inline |
Copies the characters from a specified segment of this instance to a specified segment of a destination xtd::text::basic_string_builder::value_type array.
| source_index | The starting position in this instance where characters will be copied from. The index is zero-based. |
| destination | The array where characters will be copied. |
| destination_index | The starting position in destination where characters will be copied. The index is zero-based. |
| destination_count | The number of characters to be copied. |
| xtd::argument_out_of_range_exception | `source_index` is greater than length -or- `destination_index` + 'destination_count' greater than destination size. |
|
inlinenodiscardoverridevirtualnoexcept |
Determines whether this instance and a specified object, which must also be a xtd::text::basic_string_builder object, have the same value.
| obj | The basic_string_builder to compare to this instance. |
Reimplemented from xtd::object.
|
inlinenodiscardoverridenoexcept |
Determines whether this instance and another specified xtd::text::basic_string_builder object have the same value.
| value | The basic_string_builder to compare to this instance. |
|
inline |
Ensures that the capacity of this instance of xtd::text::basic_string_builder is at least the specified value.
| capacity | The minimum capacity to ensure. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed Enlarging the value of this instance would exceed MaxCapacity.::max_capacity. |
|
inlinenodiscardvirtualnoexcept |
Returns the underlying base type.
|
inlinenodiscardoverridevirtualnoexcept |
Returns the hash code for this basic_string_builder.
Reimplemented from xtd::object.
|
inline |
Inserts a string into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The string to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts one or more copies of a specified string into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The string to insert. |
| count | The number of times to insert value. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a boolean value into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified 8-bit unsigned integer into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified 8decimal into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified double into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified single into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified 16-bit signed integer into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified 32-bit signed integer into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified 64-bit signed integer into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified 8-bit signed integer into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified 16-bit unsigned integer into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified 32-bit unsigned integer into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified 64-bit unsigned integer into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified Unicode character into this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts a specified number of copies of the string representation of a Unicode character to this instance at the specified character position.
| index | The position in this instance where insertion begins. |
| value | The character to insert. |
| repeat_count | The number of times to append value. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts the string representation of a specified object into this instance at the specified character position.
| object_t | The type of object to insert. |
| index | The position in this instance where insertion begins. |
| value | The value to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts characters into the string.
| index | The position at which the content will be inserted. |
| count | The number of characters to insert. |
| ch | The character to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts characters into the string.
| index | The position at which the content will be inserted. |
| s | The pointer to the character string to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts characters into the string.
| index | The position at which the content will be inserted. |
| str | The string to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
|
inline |
Inserts characters into the string.
| index | The position at which the content will be inserted. |
| str | The string to insert. |
| s_index | The position of the first character in str to insert. |
| count | The number of characters to insert. |
| xtd::argument_out_of_range_exception | `index` is greater than the length of this instance.<rr>-or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
/** Removes the specified range of characters from this instance.
| start_index | The zero-based position in this instance where removal begins. |
| length | The number of characters to remove. |
| xtd::argument_out_of_range_exception | If `start_index` + `length` is greater than the length of this instance. |
|
inlinenoexcept |
Replaces all occurrences of a specified character in this instance with another specified character.
| old_char | The character to replace. |
| new_char | The character that replaces old_char. |
|
inline |
Replaces, within a substring of this instance, all occurrences of a specified character with another specified character.
| old_char | The character to replace. |
| new_char | The character that replaces old_char. |
| start_index | The position in this instance where the substring begins. |
| count | The length of the substring. |
|
inline |
Replaces all occurrences of a specified string in this instance with another specified string.
| old_value | The string to replace. |
| new_value | The string that replaces 'old_value. @return A reference to this instance with all instances of old_value replaced by new_value. @exception xtd::argument_out_of_range_exception Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. @remarks This method performs an ordinal, case-sensitive comparison to identify occurrences of old_value in the current instance. If new_value is xtd::basic_string::empty_string, all occurrences of old_value are removed. */ auto replace(const xtd::basic_string<char_t>& old_value, const xtd::basic_string<char_t>& new_value) noexcept -> basic_string_builder& {return replace(old_value, new_value, 0, length());} /** @brief Replaces, within a substring of this instance, all occurrences of a specified string with another specified string. @param old_value The string to replace. @param new_value The string that replaces 'old_value. |
| start_index | The position in this instance where the substring begins. |
| count | The length of the substring. |
| xtd::argument_out_of_range_exception | `start_index` plus `count` indicates a character position not within this instance. -or- Enlarging the value of this instance would exceed xtd::text::basic_string_builder::max_capacity. |
/** Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters.
| pos | The start of the substring that is going to be replaced. |
| count | The length of the substring that is going to be replaced. |
| str | The string to use for replacement. |
|
inline |
Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters.
| first | The first itrator of range of characters that is going to be replaced. |
| last | The last itrator of range of characters that is going to be replaced. |
| str | The string to use for replacement. |
|
inline |
Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters.
| pos | The start of the substring that is going to be replaced. |
| count | The length of the substring that is going to be replaced. |
| str | The string to use for replacement. |
| pos2 | The start of the substring to replace with. |
| count2 | The number of characters to replace with. |
|
inline |
Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters.
| pos | The start of the substring that is going to be replaced. |
| count | The length of the substring that is going to be replaced. |
| cstr | The pointer to the character string to use for replacement. |
|
inline |
Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters.
| first | The first itrator of range of characters that is going to be replaced. |
| last | The last itrator of range of characters that is going to be replaced. |
| cstr | The pointer to the character string to use for replacement. |
| count2 | The number of characters to replace with. |
|
inline |
Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters.
| first | The first itrator of range of characters that is going to be replaced. |
| last | The last itrator of range of characters that is going to be replaced. |
|
inlinenodiscardoverridevirtualnoexcept |
Replaces the characters in the range [begin() + pos, begin() + std::min(pos + count, size())) or [first, last) with given characters.
| first | The first itrator of range of characters that is going to be replaced. |
| last | The last itrator of range of characters that is going to be replaced. |
| count2 | The number of characters to replace with. |
| first | The first itrator of range of characters that is going to be replaced. |
| last | The last itrator of range of characters that is going to be replaced. |
| ilist | The initializer list with the characters to use for replacement. |
/** Converts the value of this instance to a xtd::text::basic_string_builder <char>.
Reimplemented from xtd::object.
|
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. |
|
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 |
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 |
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. |
|
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 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.
| ch | Character value to append. |
|
inlinestaticconstexpr |
Represents a value that is not a valid position in a collection.
|
inlinestaticconstexpr |
Represents the index of the first valid element in a collection.
|
inlinestaticconstexpr |
Represents the index of the last valid element in a collection.