Represents a mutable string of characters. This class cannot be inherited.
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 base_type::iterator |
Represents the basic string iterator type. | |
using | const_iterator = typename base_type::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. | |
Public Fields | |
static constexpr size_type | npos |
This is a special value equal to the maximum value representable by the type xtd::size. | |
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<typename 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<typename 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 | |
const_reference | back () const |
Returns reference to the last character in the string. | |
reference | back () |
Returns reference to the last character in the string. | |
const_iterator | begin () const |
Returns an iterator to the first character of the string. | |
iterator | begin () |
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. | |
basic_string_builder & | capacity (size_type value) |
Sets the number of characters that the string has currently allocated space for. | |
const_iterator | cbegin () const |
Returns an iterator to the first character of the string. | |
const base_type & | chars () const noexcept |
Returns a reference to the underlying base type. | |
base_type & | chars () noexcept |
Returns a reference to the underlying base type. | |
const_iterator | cend () const |
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_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. | |
pointer | data () 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 |
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. | |
iterator | end () |
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. | |
reference | front () |
Returns reference to the first character in the string. The behavior is undefined if empty() is true. | |
size_type | length () const noexcept |
Gets or sets the length of the current xtd::text::basic_string_builder object. | |
basic_string_builder & | length (size_type value) noexcept |
Sets or sets the length of the current xtd::text::basic_string_builder object. | |
size_type | max_capacity () const noexcept |
Returns the number of characters that the string has currently allocated space for. | |
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. | |
size_type | size () const noexcept |
Returns the number of char_t elements in the string, i.e. std::distance(begin(), end()) . | |
Public Methods | |
basic_string_builder & | append (const xtd::basic_string< char_t > &value) |
Appends a copy of the specified string to this instance. | |
basic_string_builder & | append (const xtd::basic_string< char_t > &value, size_type start_index, size_type count) |
Appends a copy of a specified substring to this instance. | |
basic_string_builder & | append (xtd::boolean value) |
Appends the string representation of a specified boolean value to this instance. | |
basic_string_builder & | append (xtd::byte value) |
Appends the string representation of a specified 8-bit unsigned value to this instance. | |
basic_string_builder & | append (xtd::decimal value) |
Appends the string representation of a specified decimal value to this instance. | |
basic_string_builder & | append (double value) |
Appends the string representation of a specified double value to this instance. | |
basic_string_builder & | append (xtd::single value) |
Appends the string representation of a specified single value to this instance. | |
basic_string_builder & | append (xtd::int16 value) |
Appends the string representation of a specified 16-bit signed integer value to this instance. | |
basic_string_builder & | append (xtd::int32 value) |
Appends the string representation of a specified 32-bit signed integer value to this instance. | |
basic_string_builder & | append (xtd::int64 value) |
Appends the string representation of a specified 64-bit signed integer value to this instance. | |
basic_string_builder & | append (xtd::sbyte value) |
Appends the string representation of a specified 8-bit signed integer value to this instance. | |
basic_string_builder & | append (xtd::uint16 value) |
Appends the string representation of a specified 16-bit unsigned integer value to this instance. | |
basic_string_builder & | append (xtd::uint32 value) |
Appends the string representation of a specified 32-bit unsigned integer value to this instance. | |
basic_string_builder & | append (xtd::uint64 value) |
Appends the string representation of a specified 64-bit unsigned integer value to this instance. | |
basic_string_builder & | append (value_type value) |
Appends the string representation of a specified xtd::text::basic_string_builder::value_type value to this instance. | |
basic_string_builder & | append (value_type value, size_type repeat_count) |
Appends a specified number of copies of the string representation of a Unicode character to this instance. | |
template<typename object_t > | |
basic_string_builder & | append (object_t value) |
Appends the string representation of a specified object to this instance. | |
basic_string_builder & | append (size_type count, value_type ch) |
Appends additional characters to the string. | |
basic_string_builder & | append (const basic_string_builder &str) |
Appends additional characters to the string. | |
basic_string_builder & | append (const basic_string_builder &str, size_type pos) |
Appends additional characters to the string. | |
basic_string_builder & | append (const basic_string_builder &str, size_type pos, size_type count) |
Appends additional characters to the string. | |
basic_string_builder & | append (const_pointer s, size_type count) |
Appends additional characters to the string. | |
basic_string_builder & | append (const_pointer s) |
Appends additional characters to the string. | |
template<class input_iterator_t > | |
basic_string_builder & | append (input_iterator_t first, input_iterator_t last) |
Appends additional characters to the string. | |
basic_string_builder & | append (std::initializer_list< value_type > ilist) |
Appends additional characters to the string. | |
template<typename ... args_t> | |
basic_string_builder & | append_format (const xtd::basic_string< char_t > &format, args_t &&... args) |
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<typename collection_t > | |
basic_string_builder & | append_join (const xtd::basic_string< char_t > &separator, const collection_t &values) |
Concatenates and appends the members of a collection, using the specified separator between each member. | |
template<typename collection_t > | |
basic_string_builder & | append_join (value_type separator, const collection_t &values) |
Concatenates and appends the members of a collection, using the specified xtd::basic_string_builder::value_type separator between each member. | |
basic_string_builder & | append_line () |
Appends the default line terminator to the end of the current xtd::text::basic_string_builder object. | |
basic_string_builder & | append_line (const xtd::basic_string< char_t > &value) |
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. | |
const_reference | at (size_type pos) const |
Returns a reference to the character at specified location pos . | |
reference | at (size_type pos) |
Returns a reference to the character at specified location pos . | |
basic_string_builder & | clear () |
Removes all characters from the current xtd::text::basic_string_builder instance. | |
int32 | compare (const basic_string_builder &str) const |
Compares two character sequences. | |
int32 | compare (size_type pos1, size_type count1, const basic_string_builder &str) const |
Compares two character sequences. | |
int32 | compare (size_type pos1, size_type count1, const basic_string_builder &str, size_type pos2) const |
Compares two character sequences. | |
int32 | compare (size_type pos1, size_type count1, const basic_string_builder &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. | |
size_type | copy (pointer dest, size_type count) const |
Copies a substring [pos , pos + count ) to character string pointed to by dest . If the requested substring lasts past the end of the string, or if count == npos , the copied substring is [pos , size()). | |
size_type | copy (pointer dest, size_type count, size_type pos) const |
Copies a substring [pos , pos + count ) to character string pointed to by dest . If the requested substring lasts past the end of the string, or if count == npos , the copied substring is [pos , size()). | |
void | copy_to (xtd::size source_index, xtd::array< value_type > &destination, xtd::size destination_index, xtd::size destination_count) const |
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. | |
bool | equals (const object &obj) const noexcept override |
Determines whether this instance and a specified object, which must also be a xtd::text::basic_string_builder object, have the same value. | |
bool | equals (const basic_string_builder &value) const noexcept override |
Determines whether this instance and another specified xtd::text::basic_string_builder object have the same value. | |
size_type | ensure_capacity (size_type capacity) |
Ensures that the capacity of this instance of xtd::text::basic_string_builder is at least the specified value. | |
basic_string_builder & | erase () |
Removes specified characters from the string. | |
basic_string_builder & | erase (size_type index) |
Removes specified characters from the string. | |
basic_string_builder & | erase (size_type index, size_type count) |
Removes specified characters from the string. | |
iterator | erase (const_iterator position) |
Removes specified characters from the string. | |
iterator | erase (const_iterator first, const_iterator last) |
Removes specified characters from the string. | |
size_type | find (const basic_string_builder &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_builder &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_builder &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::text::basic_string_builder::npos will be returned. | |
size_type | find_first_of (const basic_string_builder &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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::npos will be returned. | |
size_type | find_first_of (value_type 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::text::basic_string_builder::npos will be returned. | |
size_type | find_first_of (value_type 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::text::basic_string_builder::npos will be returned. | |
size_type | find_first_not_of (const basic_string_builder &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::text::basic_string_builder::npos will be returned. | |
size_type | find_first_not_of (const basic_string_builder &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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::npos will be returned. | |
size_type | find_first_not_of (value_type 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::text::basic_string_builder::npos will be returned. | |
size_type | find_first_not_of (value_type 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::text::basic_string_builder::npos will be returned. | |
size_type | find_last_of (const basic_string_builder &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::text::basic_string_builder::npos will be returned. | |
size_type | find_last_of (const basic_string_builder &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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::npos will be returned. | |
size_type | find_last_of (value_type 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::text::basic_string_builder::npos will be returned. | |
size_type | find_last_of (value_type 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::text::basic_string_builder::npos will be returned. | |
size_type | find_last_not_of (const basic_string_builder &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::text::basic_string_builder::npos will be returned. | |
size_type | find_last_not_of (const basic_string_builder &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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::npos will be returned. | |
size_type | find_last_not_of (value_type 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::text::basic_string_builder::npos will be returned. | |
size_type | find_last_not_of (value_type 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::text::basic_string_builder::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_builder. | |
basic_string_builder & | insert (size_type index, const xtd::basic_string< char_t > &value) |
Inserts a string into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, const xtd::basic_string< char_t > &value, size_type count) |
Inserts one or more copies of a specified string into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, xtd::boolean value) |
Inserts the string representation of a boolean value into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, xtd::byte value) |
Inserts the string representation of a specified 8-bit unsigned integer into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, xtd::decimal value) |
Inserts the string representation of a specified 8decimal into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, double value) |
Inserts the string representation of a specified double into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, xtd::single value) |
Inserts the string representation of a specified single into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, xtd::int16 value) |
Inserts the string representation of a specified 16-bit signed integer into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, xtd::int32 value) |
Inserts the string representation of a specified 32-bit signed integer into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, xtd::int64 value) |
Inserts the string representation of a specified 64-bit signed integer into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, xtd::sbyte value) |
Inserts the string representation of a specified 8-bit signed integer into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, xtd::uint16 value) |
Inserts the string representation of a specified 16-bit unsigned integer into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, xtd::uint32 value) |
Inserts the string representation of a specified 32-bit unsigned integer into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, xtd::uint64 value) |
Inserts the string representation of a specified 64-bit unsigned integer into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, value_type value) |
Inserts the string representation of a specified Unicode character into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, value_type value, size_type repeat_count) |
Inserts a specified number of copies of the string representation of a Unicode character to this instance at the specified character position. | |
template<typename object_t > | |
basic_string_builder & | insert (size_type index, object_t value) |
Inserts the string representation of a specified object into this instance at the specified character position. | |
basic_string_builder & | insert (size_type index, size_type count, value_type ch) |
Inserts characters into the string. | |
basic_string_builder & | insert (size_type index, const_pointer s) |
Inserts characters into the string. | |
basic_string_builder & | insert (size_type index, const_pointer s, size_type count) |
Inserts characters into the string. | |
basic_string_builder & | insert (size_type index, const basic_string_builder &str) |
Inserts characters into the string. | |
basic_string_builder & | insert (size_type index, const basic_string_builder &str, size_type s_index, size_type count) |
Inserts characters into the string. | |
basic_string_builder & | insert (size_type index, const basic_string_builder &str, size_type s_index) |
Inserts characters into the string. | |
iterator | insert (const_iterator pos, value_type ch) |
Inserts characters into the string. | |
iterator | insert (const_iterator pos, size_type count, value_type ch) |
Inserts characters into the string. | |
template<typename input_iterator_t > | |
iterator | insert (const_iterator pos, input_iterator_t first, input_iterator_t last) |
Inserts characters into the string. | |
iterator | insert (const_iterator pos, std::initializer_list< value_type > ilist) |
Inserts characters into the string. | |
void | pop_back () |
Removes the last character from the string. | |
void | push_back (value_type ch) |
Appends the given character ch to the end of the string. | |
basic_string_builder & | remove (size_type start_index, size_type length) |
Removes the specified range of characters from this instance. | |
basic_string_builder & | replace (value_type old_char, value_type new_char) noexcept |
Replaces all occurrences of a specified character in this instance with another specified character. | |
basic_string_builder & | replace (value_type old_char, value_type new_char, size_type start_index, size_type count) |
Replaces, within a substring of this instance, all occurrences of a specified character with another specified character. | |
basic_string_builder & | replace (const xtd::basic_string< char_t > &old_value, const xtd::basic_string< char_t > &new_value) noexcept |
Replaces all occurrences of a specified string in this instance with another specified string. | |
basic_string_builder & | replace (const xtd::basic_string< char_t > &old_value, const xtd::basic_string< char_t > &new_value, size_type start_index, size_type count) |
Replaces, within a substring of this instance, all occurrences of a specified string with another specified string. | |
basic_string_builder & | replace (size_type pos, size_type count, const basic_string_builder &str) |
Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters. | |
basic_string_builder & | replace (const_iterator first, const_iterator last, const basic_string_builder &str) |
Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters. | |
basic_string_builder & | replace (size_type pos, size_type count, const basic_string_builder &str, size_type pos2) |
Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters. | |
basic_string_builder & | replace (size_type pos, size_type count, const basic_string_builder &str, size_type pos2, size_type count2) |
Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters. | |
basic_string_builder & | replace (size_type pos, size_type count, const_pointer cstr, size_type count2) |
Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters. | |
basic_string_builder & | replace (const_iterator first, const_iterator last, const_pointer cstr, size_type count2) |
Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters. | |
basic_string_builder & | replace (size_type pos, size_type count, const_pointer cstr) |
Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters. | |
basic_string_builder & | replace (const_iterator first, const_iterator last, const_pointer cstr) |
Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters. | |
basic_string_builder & | replace (size_type pos, size_type count, size_type count2, value_type ch) |
Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters. | |
basic_string_builder & | replace (const_iterator first, const_iterator last, size_type count2, value_type ch) |
Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters. | |
template<typename input_iterator_t > | |
basic_string_builder & | replace (const_iterator first, const_iterator last, input_iterator_t first2, input_iterator_t last2) |
Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters. | |
basic_string_builder & | replace (const_iterator first, const_iterator last, std::initializer_list< value_type > ilist) |
Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters. | |
void | reserve (size_type new_cap) |
Informs a xtd::text::basic_string_builder object of a planned change in size, so that it can manage the storage allocation appropriately. | |
void | resize (size_type count) |
Resizes the string to contain count characters. | |
void | resize (size_type count, value_type ch) |
Resizes the string to contain count characters. | |
size_type | rfind (const basic_string_builder &str) const |
Finds the last substring that is equal to the given character sequence. The search begins at xtd::text::basic_string_builder::nposand proceeds from right to left (thus, the found substring, if any, cannot begin in a position following xtd::text::basic_string_builder::npos). If xtd::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::size() - 1 is passed as xtd::text::basic_string_builder::npos, the whole string will be searched. @return Position of the first character of the found substring or xtd::text::basic_string_builder::npos if no such substring is found. @remarks Finds the first substring equal to str`. | |
size_type | rfind (const basic_string_builder &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::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::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::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::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::text::basic_string_builder::nposand proceeds from right to left (thus, the found substring, if any, cannot begin in a position following xtd::text::basic_string_builder::npos). If xtd::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::size() - 1 is passed as xtd::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::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::text::basic_string_builder::nposand proceeds from right to left (thus, the found substring, if any, cannot begin in a position following xtd::text::basic_string_builder::npos). If xtd::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::size() - 1 is passed as xtd::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::size() - 1 is passed as pos , the whole string will be searched. | |
void | shrink_to_fit () |
Requests the removal of unused capacity. | |
basic_string_builder | 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::text::basic_string_builder::npos), the returned substring is [pos , size()). | |
basic_string_builder | 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::text::basic_string_builder::npos), the returned substring is [pos , size()). | |
basic_string_builder | 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::text::basic_string_builder::npos), the returned substring is [pos , size()). | |
void | swap (basic_string_builder &other) noexcept |
Exchanges the contents of the string with those of other. All iterators and references may be invalidated. | |
xtd::string | to_string () const noexcept override |
Converts the value of this instance to a xtd::text::basic_string_builder <char>. | |
Public Operators | |
const_reference | operator[] (xtd::size index) const |
Returns a reference to the character at specified location index. | |
reference | operator[] (xtd::size index) |
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. | |
basic_string_builder & | operator= (const basic_string_builder &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str. | |
basic_string_builder & | operator= (basic_string_builder &&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_builder & | operator= (const std::basic_string< value_type > &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string_builder & | operator= (std::basic_string< value_type > &&str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string_builder & | operator= (const xtd::basic_string< value_type > &str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string_builder & | operator= (xtd::basic_string< value_type > &&str) noexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string_builder & | operator= (const_pointer str) |
Copy assignment operator. Replaces the contents with a copy of the contents of str . | |
basic_string_builder & | operator= (value_type character) |
Copy assignment operator. Replaces the contents with the specified character. | |
basic_string_builder & | operator= (const std::initializer_list< value_type > &il) |
Copy assignment operator. Replaces the contents with a copy of the contents of the specified initializer list. | |
basic_string_builder & | operator+= (const basic_string_builder &str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string_builder & | operator+= (basic_string_builder &&str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string_builder & | operator+= (const_pointer str) |
Addition assignment operator. Appends additional characters to the string. | |
basic_string_builder & | operator+= (value_type ch) |
Addition assignment operator. Appends additional characters to the string. | |
Additional Inherited Members | |
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::iequatable< type_t > | |
virtual bool | equals (const type_t &) const noexcept=0 |
Indicates whether the current object is equal to another object of the same type. | |
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::text::basic_string_builder< 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::text::basic_string_builder< char_t, traits_t, allocator_t >::traits_type = typename base_type::traits_type |
Represents the basic string traits type.
using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::value_type = typename base_type::value_type |
Represents the basic string value type.
using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::allocator_type = typename base_type::allocator_type |
Represents the basic string allocator type.
using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::size_type = typename base_type::size_type |
Represents the basic string size type.
using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::difference_type = typename base_type::difference_type |
Represents the basic string difference type.
using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::reference = typename base_type::reference |
Represents the basic string referecne type.
using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::const_reference = typename base_type::const_reference |
Represents the basic string const referecne type.
using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::pointer = typename base_type::pointer |
Represents the basic string pointer type.
using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::const_pointer = typename base_type::const_pointer |
Represents the basic string const pointer type.
using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::iterator = typename base_type::iterator |
Represents the basic string iterator type.
using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::const_iterator = typename base_type::const_iterator |
Represents the basic string const iterator type.
using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::reverse_iterator = typename base_type::reverse_iterator |
Represents the basic string reverse iterator type.
using xtd::text::basic_string_builder< char_t, traits_t, allocator_t >::const_reverse_iterator = typename base_type::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. |
capacity
parameter defines the maximum number of characters that can be stored in the memory allocated by the current instance. Its value is assigned to the xtd::text::basic_string_builder::capacity property. If the number of characters to be stored in the current instance exceeds this capacity value, the xtd::text::basic_string_builder object allocates additional memory to store them.
|
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`. |
capacity
parameter defines the maximum number of characters that can be stored in the memory allocated by the current instance. Its value is assigned to the xtd::text::basic_string_builder::capacity property. If the number of characters to be stored in the current instance exceeds this capacity value, the xtd::text::basic_string_builder object allocates additional memory to store them. capacity
is zero, the implementation-specific default capacity is used. max_capacity
parameter defines the maximum number of characters that the current instance can hold. Its value is assigned to the xtd::text::basic_string_builder::max_capacity property. If the number of characters to be stored in the current instance exceeds this max_capacity
value, the xtd::text::basic_string_builder object does not allocate additional memory, but instead throws an exception.
|
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. |
capacity
parameter defines the maximum number of characters that can be stored in the memory allocated by the current instance. Its value is assigned to the xtd::text::basic_string_builder::capacity property. If the number of characters to be stored in the current instance exceeds this capacity value, the xtd::text::basic_string_builder object allocates additional memory to store them.
|
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`. |
capacity
parameter defines the maximum number of characters that can be stored in the memory allocated by the current instance. Its value is assigned to the xtd::text::basic_string_builder::capacity property. If the number of characters to be stored in the current instance exceeds this capacity value, the xtd::text::basic_string_builder object allocates additional memory to store them.
|
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.
first | The first iterator of substring. |
last | The first iterator 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. |
|
inline |
Returns reference to the last character in the string.
operator[](size() - 1)
. xtd::index_out_of_range_exception | If is empty. |
|
inline |
Returns reference to the last character in the string.
operator[](size() - 1)
. xtd::index_out_of_range_exception | If is empty. |
|
inline |
Returns an iterator to the first character of the string.
|
inline |
Returns an iterator to the first character of the string.
|
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.
|
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. |
|
inline |
Returns an iterator to the first character of the string.
|
inlinenoexcept |
Returns a reference to the underlying base type.
|
inlinenoexcept |
Returns a reference to the underlying base type.
|
inline |
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.
|
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 |
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 |
|
inline |
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.
|
inline |
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.
|
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. |
|
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 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. |
|
inlinenoexcept |
Returns the number of characters that the string has currently allocated space for.
|
inlinenoexcept |
|
inlinenoexcept |
|
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. |
value
is empty
, no changes are made.
|
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`. |
value
is empty
and start_index
and count
are both zero, no changes are made.
|
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. |
dog
class, creates a dog
object, and makes three calls to the xtd::text::basic_string_builder::append method to create a string that contains the dog's name and breed.
|
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. |
count
copies of character ch
.
|
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. |
str
.
|
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. |
pos
, pos
+ count
) of str
. count == npos
, the appended substring is [pos
, size()). pos > str.size()
, std::out_of_range
is thrown.
|
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. |
pos
, pos
+ count
) of str
. count == npos
, the appended substring is [pos
, size()). pos > str.size()
, std::out_of_range
is thrown.
|
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. |
s
, s + count
). This range can contain null characters. s
, s + count
) is not a valid range, the behavior is undefined.
|
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. |
s
, as if by append(s, traits_t::length(s))
.
|
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. |
first
, last
). input_iterator_t
qualifies as a LegacyInputIterator.
|
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. |
ilist
.
|
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. |
format
parameter consists of optional zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to objects in the parameter list of this method. The formatting process replaces each format item with the string representation of the corresponding object. {[index][,length][:format_string]}
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 |
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 |
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 |
Removes all characters from the current xtd::text::basic_string_builder instance.
|
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 |
Copies a substring [pos
, pos + count
) to character string pointed to by dest
. If the requested substring lasts past the end of the string, or if count == npos
, the copied substring is [pos
, size()).
dest | The pointer to the destination character string. |
count | length of the substring. |
|
inline |
Copies a substring [pos
, pos + count
) to character string pointed to by dest
. If the requested substring lasts past the end of the string, or if count == npos
, the copied substring is [pos
, size()).
dest | The pointer to the destination character string. |
count | length of the substring. |
pos | The position of the first character to include. |
|
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. |
|
inlineoverridevirtualnoexcept |
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. |
true
if obj
is a xtd::text::basic_string_builder and its value is the same as this instance; otherwise, false
. Reimplemented from xtd::object.
|
inlineoverridenoexcept |
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. |
true
if the value
of the value parameter is the same as the value of this instance; otherwise, false
.
|
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. |
capacity
parameter, memory for this instance is reallocated to hold at least capacity
number of characters; otherwise, no memory is changed.
|
inline |
Removes specified characters from the string.
std::min(count, size() - index)
characters starting at index.
|
inline |
Removes specified characters from the string.
index | The first character to remove. |
std::min(count, size() - index)
characters starting at index.
|
inline |
Removes specified characters from the string.
index | The first character to remove. |
count | The number of characters to remove. |
std::min(count, size() - index)
characters starting at index.
|
inline |
Removes specified characters from the string.
position | The iterator to the character to remove. |
position
. position
is not a dereferenceable iterator on *this
, the behavior is undefined.
|
inline |
Removes specified characters from the string.
first | The first iterator of the range of the characters to remove. |
last | The last iterator of the range of the characters to remove. |
first
, last
). first
or last
is not a valid iterator on *this
, or [first
, last
) 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
.
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::text::basic_string_builder::npos will be returned.
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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::npos will be returned.
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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::npos will be returned.
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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::npos will be returned.
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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::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 |
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
value
is empty
(its length
is zero).
|
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. |
count
copies of character ch
at the position index
.
|
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. |
s
at the position index
. The length of the string is determined by the first null character using `traits_t::length(s).
|
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. |
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. |
s
, s + count
) at the position index
. The range can contain null characters.
|
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. |
str
at the position index
.
|
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. |
str.substr(s_index, count)
at the position `index.
|
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. |
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. |
str.substr(s_index, str.length())
at the position `index.
|
inline |
Inserts characters into the string.
pos | The iterator before which the characters will be inserted. |
ch | The character to insert. |
pos
if no characters were inserted (count == 0
or first == last
or ilist.size() == 0
) xtd::argument_out_of_range_exception | `pos` 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. |
ch
before the character pointed by pos
.
|
inline |
Inserts characters into the string.
pos | The iterator before which the characters will be inserted. |
count | The number of characters to insert. |
ch | The character to insert. |
pos
if no characters were inserted (count == 0
or first == last
or ilist.size() == 0
) xtd::argument_out_of_range_exception | `pos` 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. |
count
copies of character ch
before the element (if any) pointed by pos
.
|
inline |
Inserts characters into the string.
pos | The iterator before which the characters will be inserted. |
first | The firs position of range defining characters to insert. |
last | The last position of range defining characters to insert. |
pos
if no characters were inserted (count == 0
or first == last
or ilist.size() == 0
) xtd::argument_out_of_range_exception | `pos` 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. |
first
, last
) before the element (if any) pointed by pos
, as if by insert(pos - begin(), basic_string(first, last, get_allocator()))
.
|
inline |
Inserts characters into the string.
pos | The iterator before which the characters will be inserted. |
ilist | The std::initializer_list to insert the characters from |
pos
if no characters were inserted (count == 0
or first == last
or ilist.size() == 0
) xtd::argument_out_of_range_exception | `pos` 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. |
ilist
before the element (if any) pointed by pos
.
|
inline |
Removes the last character from the string.
erase(end() - 1)
. The behavior is undefined if the string is empty.
|
inline |
Appends the given character ch to the end of the string.
ch | The character to append. |
|
inline |
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. |
start_index
+ length
) are moved to start_index
, and the string value of the current instance is shortened by length
. The capacity of the current instance is unaffected.
|
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 . |
old_char
replaced by new_char
. old_char
in the current instance. The size of the current xtd::text::basic_string_builder instance is unchanged after the replacement.
|
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. |
old_char
replaced by new_char
in the range from start_ index
to start_index
+ count
- 1. old_char
in the current instance. The size of the current xtd::text::basic_string_builder object is unchanged after the replacement.
|
inlinenoexcept |
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_valuereplaced 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_valuein the current instance. If new_valueis xtd::basic_string::empty_string, all occurrences of old_value` are removed. |
|
inline |
Replaces, within a substring of this instance, all occurrences of a specified string with another specified string.
old_value | The string to replace. |
new_value | The string that replaces 'old_value. @param start_index The position in this instance where the substring begins. @param count The length of the substring. @return A reference to this instance with all instances of old_valuereplaced by new_valuein the range from start_indexto start_index+ count- 1. @exception xtd::argument_out_of_range_exception start_indexplus countindicates a character position not within this instance.<br>-or-<br>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_valuein the substring of this current instance. If new_valueis xtd::basic_string::empty_string, all occurrences of old_value` are removed. |
|
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. |
str
.
|
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. |
str
. begin()
, first
) or [first
, last`) is not a valid range, the behavior is undefined.
|
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. |
pos2
, std::min(pos2 + count2, str.size())
) of str
.
|
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. |
pos2
, std::min(pos2 + count2, str.size())
) of str
.
|
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. |
cstr
, cstr + count2
). cstr
, cstr + count2
) is not a valid range, the behavior is undefined.
|
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. |
cstr
, cstr + count2
). cstr
, cstr + count2
) is not a valid range, the behavior is undefined. begin()
, first
) or [first
, last`) is not a valid range, the behavior is undefined.
|
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. |
cstr
, cstr + Traits::length(cstr)
).
|
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
, cstr + Traits::length(cstr)
). begin()
, first
) or [first
, last`) is not a valid range, the behavior is undefined.
|
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. |
count2 | The number of characters to replace with. |
count2
copies of ch
.
|
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. |
count2 | The number of characters to replace with. |
count2
copies of ch
. begin()
, first
) or [first
, last`) is not a valid range, the behavior is undefined.
|
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. |
first2 | The first itrator of range of characters to use for replacement. |
last2 | The last itrator of range of characters to use for replacement. |
first2
, last2
) as if by replace(first, last, basic_string(first2, last2, get_allocator()))
. begin()
, first
) or [first
, last`) is not a valid range, the behavior is undefined.
|
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. |
ilist | The initializer list with the characters to use for replacement. |
ilist
. begin()
, first
) or [first
, last`) is not a valid range, the behavior is undefined.
|
inline |
Informs a xtd::text::basic_string_builder object of a planned change in size, so that it can manage the storage allocation appropriately.
new_cap | The new capacity of the string. |
new_cap
is greater than the current capacity(), new storage is allocated, and capacity() is made equal or greater than new_cap
. new_cap
is less than or equal to the current capacity(), there is no effect.
|
inline |
Resizes the string to contain count characters.
count | The new size of the string. |
count
, additional characters are appended:
|
inline |
Resizes the string to contain count characters.
count | The new size of the string. |
ch | The character to initialize the new characters with. |
count
, additional characters are appended: ch
.
|
inline |
Finds the last substring that is equal to the given character sequence. The search begins at xtd::text::basic_string_builder::nposand proceeds from right to left (thus, the found substring, if any, cannot begin in a position following xtd::text::basic_string_builder::npos). If xtd::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::size() - 1 is passed as xtd::text::basic_string_builder::npos, the whole string will be searched. @return Position of the first character of the found substring or xtd::text::basic_string_builder::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::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::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::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::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::text::basic_string_builder::nposand proceeds from right to left (thus, the found substring, if any, cannot begin in a position following xtd::text::basic_string_builder::npos). If xtd::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::size() - 1 is passed as xtd::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::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::text::basic_string_builder::nposand proceeds from right to left (thus, the found substring, if any, cannot begin in a position following xtd::text::basic_string_builder::npos). If xtd::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::size() - 1 is passed as xtd::text::basic_string_builder::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::text::basic_string_builder::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::text::basic_string_builder::npos or any value not smaller than xtd::text::basic_string_builder::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).
|
inline |
Requests the removal of unused capacity.
|
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::text::basic_string_builder::npos), the returned substring is [pos
, size()).
pos
, pos + count
) or [pos, size()). `std::out_of_range` | if `pos > size()`. |
basic_string_builder(*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::text::basic_string_builder::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_builder(*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::text::basic_string_builder::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_builder(*this, pos, count);
.
|
inlinenoexcept |
Exchanges the contents of the string with those of other. All iterators and references may be invalidated.
other | The string to exchange the contents with. |
|
inlineoverridevirtualnoexcept |
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 |
This is a special value equal to the maximum value representable by the type xtd::size.