|
Appends a copy of the specified string to this instance. /
/
/ / - Parameters
-
value | The string to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(const xtd::basic_string<char_t>& value) {return append(basic_string_builder {value});} / Appends a copy of a specified substring to this instance. /
- Parameters
-
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. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
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`. / |
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(const xtd::basic_string<char_t>& value, size_type start_index, size_type count) {return append(basic_string_builder {value, start_index, count});} / Appends the string representation of a specified boolean value to this instance. /
- Parameters
-
value | The boolean value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(xtd::boolean value) {return append_format("{}", value);} / Appends the string representation of a specified 8-bit unsigned value to this instance. /
- Parameters
-
value | The 8-bit unsigned value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(xtd::byte value) {return append_format("{}", value);} / Appends the string representation of a specified decimal value to this instance. /
- Parameters
-
value | The decimal value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(xtd::decimal value) {return append_format("{}", value);} / Appends the string representation of a specified double value to this instance. /
- Parameters
-
value | The double value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(double value) {return append_format("{}", value);} / Appends the string representation of a specified single value to this instance. /
- Parameters
-
value | The single value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(xtd::single value) {return append_format("{}", value);} / Appends the string representation of a specified 16-bit signed integer value to this instance. /
- Parameters
-
value | The 16-bit signed value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(xtd::int16 value) {return append_format("{}", value);} / Appends the string representation of a specified 32-bit signed integer value to this instance. /
- Parameters
-
value | The 32-bit signed value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(xtd::int32 value) {return append_format("{}", value);} / Appends the string representation of a specified 64-bit signed integer value to this instance. /
- Parameters
-
value | The 64-bit signed value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(xtd::int64 value) {return append_format("{}", value);} / Appends the string representation of a specified 8-bit signed integer value to this instance. /
- Parameters
-
value | The 8-bit signed integer value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(xtd::sbyte value) {return append_format("{}", value);} / Appends the string representation of a specified 16-bit unsigned integer value to this instance. /
- Parameters
-
value | The 16-bit unsigned value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(xtd::uint16 value) {return append_format("{}", value);} / Appends the string representation of a specified 32-bit unsigned integer value to this instance. /
- Parameters
-
value | The 32-bit unsigned value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(xtd::uint32 value) {return append_format("{}", value);} / Appends the string representation of a specified 64-bit unsigned integer value to this instance. /
- Parameters
-
value | The 64-bit unsigned value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(xtd::uint64 value) {return append_format("{}", value);} / Appends the string representation of a specified xtd::text::basic_string_builder::value_type value to this instance. /
- Parameters
-
value | The xtd::text::basic_string_builder::value_type value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(value_type value) {return append(1_z, value);} / Appends a specified number of copies of the string representation of a Unicode character to this instance. /
- Parameters
-
value | The character to append. / |
repeat_count | The number of times to append value . / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(value_type value, size_type repeat_count) {return append(repeat_count, value);}
/
/ Appends the string representation of a specified object to this instance. / - Template Parameters
-
object_t | The type of object to append. / |
- Parameters
-
value | The object to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. template<class object_t> basic_string_builder& append(object_t value) {return append_format("{}", value);} / Appends additional characters to the string. /
- Parameters
-
count | The number of characters to append. / |
ch | The character value to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(size_type count, value_type ch) {return append(basic_string_builder(count, ch));} / Appends additional characters to the string. /
- Parameters
-
str | The string to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(const basic_string_builder& str) {return append(str, 0, str.length());} / Appends additional characters to the string. /
- Parameters
-
str | The string to append. / |
pos | The index of the first character to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(const basic_string_builder& str, size_type pos) {return append(str, pos, str.length() - pos);} / Appends additional characters to the string. /
- Parameters
-
str | The string to append. / |
pos | The index of the first character to append. / |
count | The number of characters to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(const basic_string_builder& str, size_type pos, size_type count) { if (length() + count > max_capacity()) xtd::helpers::throw_helper::throws(xtd::helpers::exception_case::argument_out_of_range); if (pos > str.size() || pos + count > str.length()) xtd::helpers::throw_helper::throws(xtd::helpers::exception_case::argument_out_of_range);; chars_.append(str.chars_, pos, count); return *this; } / Appends additional characters to the string. /
- Parameters
-
s | The pointer to the character string to append. / |
count | The number of characters to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(const_pointer s, size_type count) {return append(basic_string_builder {s, count});} / Appends additional characters to the string. /
- Parameters
-
s | The pointer to the character string to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(const_pointer s) {return append(basic_string_builder {s});} / Appends additional characters to the string. /
- Parameters
-
first | The first iterator of the range of characters to append. / |
last | The last iterator of the range of characters to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Parameters
-
ilist | The initializer list with the characters to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append(std::initializer_list<value_type> ilist) {return append(basic_string_builder {ilist});}
/ 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 Parameters
-
...args_t | Types of the values to format. / |
- Parameters
-
format | A composite format string. / |
args | Arguments to format. / |
- Returns
- A reference to this instance with format appended. Each format item in format is replaced by the string representation of the corresponding object argument. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. template<class ...args_t> basic_string_builder& append_format(const xtd::basic_string<char_t>& format, args_t&& ... args) {return append(xtd::basic_string<char_t>::format(format, std::forward<args_t>(args)...));}
/ Concatenates and appends the members of a collection, using the specified separator between each member. / - Parameters
-
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. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. template<class collection_t> basic_string_builder& append_join(const xtd::basic_string<char_t>& separator, const collection_t &values) {return append(xtd::basic_string<char_t>::join(separator, values));} / Concatenates and appends the members of a collection, using the specified xtd::basic_string_builder::value_type separator between each member. /
- Parameters
-
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. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. template<class collection_t> basic_string_builder& append_join(value_type separator, const collection_t &values) {return append(xtd::basic_string<char_t>::join(xtd::basic_string<char_t>(1, separator), values));}
/
/ Appends the default line terminator to the end of the current xtd::text::basic_string_builder object. / - Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append_line() {return append(xtd::basic_string<char_t> {xtd::environment::new_line()});} / 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. /
- Parameters
-
value | The string to append. / |
- Returns
- A reference to this instance after the append operation has completed. /
- Exceptions
-
- Notes to Callers
- / When you instantiate the xtd::text::basic_string_builder object by calling the xtd::text::basic_string_builder::basic_string_builder(xtd::size, xtd::size) constructor, both the length and the capacity of the xtd::text::basic_string_builder instance can grow beyond the value of its xtd::text::basic_string_builder::max_capacity property. This can occur particularly when you call the xtd::text::basic_string_builder::append and xtd::text::basic_string_builder::append_format methods to append small strings. basic_string_builder& append_line(const xtd::basic_string<char_t>& value) {return append(value).append_line();}
/ Returns a reference to the character at specified location pos . / - Returns
- Reference to the requested character. /
- Exceptions
-
- Returns
- Reference to the requested character. /
- Exceptions
-
/ Removes all characters from the current xtd::text::basic_string_builder instance. / - Returns
- An object whose xtd::text::basic_string_builder::length is 0 (zero). /
/ Compares two character sequences. / - Parameters
-
str | The other string to compare to. / |
- Returns
- / * Negative value if
*this appears before the character sequence specified by the arguments, in lexicographical order. / * Zero if both character sequences compare equivalent. / * Positive value if *this appears after the character sequence specified by the arguments, in lexicographical order. /
- Parameters
-
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. / |
- Returns
- / * Negative value if
*this appears before the character sequence specified by the arguments, in lexicographical order. / * Zero if both character sequences compare equivalent. / * Positive value if *this appears after the character sequence specified by the arguments, in lexicographical order. /
- Parameters
-
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. / |
- Returns
- / * Negative value if
*this appears before the character sequence specified by the arguments, in lexicographical order. / * Zero if both character sequences compare equivalent. / * Positive value if *this appears after the character sequence specified by the arguments, in lexicographical order. /
- Parameters
-
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. / |
- Returns
- A 32-bit signed integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the value parameter: / * Negative value if
*this appears before the character sequence specified by the arguments, in lexicographical order. / * Zero if both character sequences compare equivalent. / * Positive value if *this appears after the character sequence specified by the arguments, in lexicographical order. /
- Parameters
-
s | pointer to the character string to compare to. / |
- Returns
- / * Negative value if
*this appears before the character sequence specified by the arguments, in lexicographical order. / * Zero if both character sequences compare equivalent. / * Positive value if *this appears after the character sequence specified by the arguments, in lexicographical order. /
- Parameters
-
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. / |
- Returns
- / * Negative value if
*this appears before the character sequence specified by the arguments, in lexicographical order. / * Zero if both character sequences compare equivalent. / * Positive value if *this appears after the character sequence specified by the arguments, in lexicographical order. /
|
int32 | compare (size_type pos1, size_type count1, const_pointer s) const |
|
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<class 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 basic_string_builder &str, size_type s_index, size_type count) |
| Inserts characters into the string.
|
|
basic_string_builder & | replace (const xtd::basic_string< char_t > &old_value, const xtd::basic_string< char_t > &new_value) noexcept |
| Inserts characters into the string.
|
|
basic_string_builder & | replace (const_iterator first, const_iterator last, const basic_string_builder &str) |
| 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, 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) |
| 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.
|
|
template<class 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.
|
|
size_type | rfind (const basic_string_builder &str) const |
| Replaces the characters in the range [begin() + pos , begin() + std::min(pos + count, size()) ) or [first , last ) with given characters.
|
|
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 (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 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) const {return chars_.rfind(s);} / @brief Finds the last substring that is equal to the given character sequence. The search begins at posand 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. / @param s The pointer to a character string to search for. / @param pos The position at which to start the search / @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 {return chars_.rfind(s, pos);} / @brief Finds the last substring that is equal to the given character sequence. The search begins at xtd::text::basic_string_builder::npos and 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.
|
|
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>.
|
|