StringBuilder
A mutable sequence of characters.
String builder can be used to efficiently perform multiple string manipulation operations.
Since Kotlin
1.0A mutable sequence of characters.
String builder can be used to efficiently perform multiple string manipulation operations.
Since Kotlin
1.1Since Kotlin
1.1A mutable sequence of characters.
String builder can be used to efficiently perform multiple string manipulation operations.
Since Kotlin
1.3Constructors
Constructs an empty string builder.
Constructs an empty string builder with the specified initial capacity.
Constructs a string builder that contains the same characters as the specified content char sequence.
Constructs a string builder that contains the same characters as the specified content string.
Constructs an empty string builder.
Constructs an empty string builder with the specified initial capacity.
Constructs a string builder that contains the same characters as the specified content char sequence.
Constructs an empty string builder.
Constructs an empty string builder with the specified initial capacity.
Constructs a string builder that contains the same characters as the specified content char sequence.
Constructs a string builder that contains the same characters as the specified content string.
Properties
Functions
Returns true if char sequence has at least one character.
Returns true if at least one character matches the given predicate.
Appends the string representation of the specified object value to this string builder and returns this instance.
Appends the string representation of the specified boolean value to this string builder and returns this instance.
Appends the specified character value to this Appendable and returns this instance.
Appends characters in the specified character array value to this string builder and returns this instance.
Appends the specified character sequence value to this Appendable and returns this instance.
Appends the specified string value to this string builder and returns this instance.
Appends a subsequence of the specified character sequence value to this Appendable and returns this instance.
Appends the string representation of the specified object value to this string builder and returns this instance.
Appends the string representation of the specified boolean value to this string builder and returns this instance.
Appends the specified character value to this Appendable and returns this instance.
Appends characters in the specified character array value to this string builder and returns this instance.
Appends the specified character sequence value to this Appendable and returns this instance.
Appends the specified string value to this string builder and returns this instance.
Appends a subsequence of the specified character sequence value to this Appendable and returns this instance.
Appends the string representation of the specified object value to this string builder and returns this instance.
Appends the string representation of the specified boolean value to this string builder and returns this instance.
Appends the specified character value to this Appendable and returns this instance.
Appends characters in the specified character array value to this string builder and returns this instance.
Appends the specified character sequence value to this Appendable and returns this instance.
Appends the specified string value to this string builder and returns this instance.
Appends a subsequence of the specified character sequence value to this Appendable and returns this instance.
Appends all arguments to the given StringBuilder.
Appends a line feed character (\n) to this Appendable.
Appends a line feed character (\n) to this StringBuilder.
Appends value to the given Appendable and a line feed character (\n) after it.
Appends value to this StringBuilder, followed by a line feed character (\n).
Appends value to this StringBuilder, followed by a line feed character (\n).
Appends value to this StringBuilder, followed by a line feed character (\n).
Appends a line separator to this Appendable.
Appends a line separator to this StringBuilder.
Appends value to the given Appendable and line separator after it.
Appends value to this StringBuilder, followed by a line separator.
Appends characters in a subarray of the specified character array value to this string builder and returns this instance.
Appends a subsequence of the specified character sequence value to this string builder and returns this instance.
Appends characters in a subarray of the specified character array value to this string builder and returns this instance.
Appends a subsequence of the specified character sequence value to this string builder and returns this instance.
Appends characters in a subarray of the specified character array value to this string builder and returns this instance.
Appends a subsequence of the specified character sequence value to this string builder and returns this instance.
Appends characters in a subarray of the specified character array value to this string builder and returns this instance.
Appends a subsequence of the specified character sequence value to this string builder and returns this instance.
Appends characters in a subarray of the specified character array value to this string builder and returns this instance.
Appends a subsequence of the specified character sequence value to this string builder and returns this instance.
Creates an Iterable instance that wraps the original char sequence returning its characters when being iterated.
Creates a Sequence instance that wraps the original char sequence returning its characters when being iterated.
Returns a Map containing the characters from the given char sequence indexed by the key returned from keySelector function applied to each character.
Returns a Map containing the values provided by valueTransform and indexed by keySelector functions applied to characters of the given char sequence.
Populates and returns the destination mutable map with key-value pairs, where key is provided by the keySelector function applied to each character of the given char sequence and value is the character itself.
Populates and returns the destination mutable map with key-value pairs, where key is provided by the keySelector function and and value is provided by the valueTransform function applied to characters of the given char sequence.
Populates and returns the destination mutable map with key-value pairs provided by transform function applied to each character of the given char sequence.
Returns a Map where keys are characters from the given char sequence and values are produced by the valueSelector function applied to each character.
Populates and returns the destination mutable map with key-value pairs for each character of the given char sequence, where key is the character itself and value is provided by the valueSelector function applied to that key.
Clears the content of this string builder making it empty and returns this instance.
Clears the content of this string builder making it empty and returns this instance.
Clears the content of this string builder making it empty and returns this instance.
Clears the content of this string builder making it empty and returns this instance.
Clears the content of this string builder making it empty and returns this instance.
Returns true if this char sequence contains at least one match of the specified regular expression regex.
Returns true if this char sequence contains the specified character char.
Returns true if this char sequence contains the specified other sequence of characters as a substring.
Returns true if the contents of this char sequence are equal to the contents of the specified other, i.e. both char sequences contain the same number of the same characters in the same order.
Returns true if the contents of this char sequence are equal to the contents of the specified other, optionally ignoring case difference.
Returns true if the contents of this char sequence are equal to the contents of the specified other, i.e. both char sequences contain the same number of the same characters in the same order.
Returns true if the contents of this char sequence are equal to the contents of the specified other, optionally ignoring case difference.
Returns true if the contents of this char sequence are equal to the contents of the specified other, i.e. both char sequences contain the same number of the same characters in the same order.
Returns true if the contents of this char sequence are equal to the contents of the specified other, optionally ignoring case difference.
Returns true if the contents of this char sequence are equal to the contents of the specified other, i.e. both char sequences contain the same number of the same characters in the same order.
Returns true if the contents of this char sequence are equal to the contents of the specified other, optionally ignoring case difference.
Returns the length of this char sequence.
Returns the number of characters matching the given predicate.
Removes the character at the specified index from this string builder and returns this instance.
Removes the character at the specified index from this string builder and returns this instance.
Removes the character at the specified index from this string builder and returns this instance.
Removes the character at the specified index from this string builder and returns this instance.
Removes the character at the specified index from this string builder and returns this instance.
Removes characters in the specified range from this string builder and returns this instance.
Removes characters in the specified range from this string builder and returns this instance.
Removes characters in the specified range from this string builder and returns this instance.
Removes characters in the specified range from this string builder and returns this instance.
Removes characters in the specified range from this string builder and returns this instance.
Removes characters in the specified range from this string builder and returns this instance.
Returns a subsequence of this char sequence with the first n characters removed.
Returns a subsequence of this char sequence with the last n characters removed.
Returns a subsequence of this char sequence containing all characters except last characters that satisfy the given predicate.
Returns a subsequence of this char sequence containing all characters except first characters that satisfy the given predicate.
Returns a character at the given index or throws an IndexOutOfBoundsException if the index is out of bounds of this char sequence.
Returns a character at the given index or throws an IndexOutOfBoundsException if the index is out of bounds of this char sequence.
Returns a character at the given index or throws an IndexOutOfBoundsException if the index is out of bounds of this char sequence.
Returns a character at the given index or throws an IndexOutOfBoundsException if the index is out of bounds of this char sequence.
Returns a character at the given index or the result of calling the defaultValue function if the index is out of bounds of this char sequence.
Returns true if this char sequence ends with the specified character.
Returns true if this char sequence ends with the specified suffix.
Ensures that the capacity of this string builder is at least equal to the specified minimumCapacity.
Ensures that the capacity of this string builder is at least equal to the specified minimumCapacity.
Ensures that the capacity of this string builder is at least equal to the specified minimumCapacity.
Returns a char sequence containing only those characters from the original char sequence that match the given predicate.