StringBuilder

expect class StringBuilder constructor(content: String) : Appendable, CharSequence

A mutable sequence of characters.

String builder can be used to efficiently perform multiple string manipulation operations.

actual typealias StringBuilder = StringBuilder
actual class StringBuilder constructor(content: String) : Appendable, CharSequence

A mutable sequence of characters.

String builder can be used to efficiently perform multiple string manipulation operations.

actual class StringBuilder constructor(content: String) : CharSequence, Appendable

A mutable sequence of characters.

String builder can be used to efficiently perform multiple string manipulation operations.

Constructors

StringBuilder
Link copied to clipboard
expect fun StringBuilder()

Constructs an empty string builder.

actual fun StringBuilder()

Constructs an empty string builder.

actual fun StringBuilder()

Constructs an empty string builder.

StringBuilder
Link copied to clipboard
expect fun StringBuilder(capacity: Int)

Constructs an empty string builder with the specified initial capacity.

actual fun StringBuilder(capacity: Int)

Constructs an empty string builder with the specified initial capacity.

actual fun StringBuilder(capacity: Int)

Constructs an empty string builder with the specified initial capacity.

StringBuilder
Link copied to clipboard
expect fun StringBuilder(content: CharSequence)

Constructs a string builder that contains the same characters as the specified content char sequence.

actual fun StringBuilder(content: CharSequence)

Constructs a string builder that contains the same characters as the specified content char sequence.

actual fun StringBuilder(content: CharSequence)

Constructs a string builder that contains the same characters as the specified content char sequence.

StringBuilder
Link copied to clipboard
expect fun StringBuilder(content: String)

Constructs a string builder that contains the same characters as the specified content string.

actual fun StringBuilder(content: String)
actual fun StringBuilder(content: String)

Constructs a string builder that contains the same characters as the specified content string.

Functions

append
Link copied to clipboard
expect fun append(value: Any?): StringBuilder

Appends the string representation of the specified object value to this string builder and returns this instance.

expect fun append(value: Boolean): StringBuilder

Appends the string representation of the specified boolean value to this string builder and returns this instance.

Since Kotlin

1.3
expect open override fun append(value: Char): StringBuilder

Appends the specified character value to this Appendable and returns this instance.

expect fun append(value: CharArray): StringBuilder

Appends characters in the specified character array value to this string builder and returns this instance.

Since Kotlin

1.4
expect open override fun append(value: CharSequence?): StringBuilder

Appends the specified character sequence value to this Appendable and returns this instance.

expect fun append(value: String?): StringBuilder

Appends the specified string value to this string builder and returns this instance.

Since Kotlin

1.3
expect open override fun append(value: CharSequence?, startIndex: Int, endIndex: Int): StringBuilder

Appends a subsequence of the specified character sequence value to this Appendable and returns this instance.

actual fun append(value: Any?): StringBuilder

Appends the string representation of the specified object value to this string builder and returns this instance.

actual fun append(value: Boolean): StringBuilder

Appends the string representation of the specified boolean value to this string builder and returns this instance.

Since Kotlin

1.3
actual open override fun append(value: Char): StringBuilder

Appends the specified character value to this Appendable and returns this instance.

actual fun append(value: CharArray): StringBuilder

Appends characters in the specified character array value to this string builder and returns this instance.

Since Kotlin

1.4
actual open override fun append(value: CharSequence?): StringBuilder

Appends the specified character sequence value to this Appendable and returns this instance.

fun append(value: String): StringBuilder

actual fun append(value: String?): StringBuilder

Appends the specified string value to this string builder and returns this instance.

Since Kotlin

1.3
actual open override fun append(value: CharSequence?, startIndex: Int, endIndex: Int): StringBuilder

Appends a subsequence of the specified character sequence value to this Appendable and returns this instance.

actual fun append(value: Any?): StringBuilder

Appends the string representation of the specified object value to this string builder and returns this instance.

actual fun append(value: Boolean): StringBuilder

Appends the string representation of the specified boolean value to this string builder and returns this instance.

fun append(value: Byte): StringBuilder
fun append(value: Double): StringBuilder
fun append(value: Float): StringBuilder
fun append(value: Int): StringBuilder
fun append(value: Long): StringBuilder
fun append(value: Short): StringBuilder
fun append(value: String): StringBuilder

actual open override fun append(value: Char): StringBuilder

Appends the specified character value to this Appendable and returns this instance.

actual fun append(value: CharArray): StringBuilder

Appends characters in the specified character array value to this string builder and returns this instance.

actual open override fun append(value: CharSequence?): StringBuilder

Appends the specified character sequence value to this Appendable and returns this instance.

actual fun append(value: String?): StringBuilder

Appends the specified string value to this string builder and returns this instance.

actual open override fun append(value: CharSequence?, startIndex: Int, endIndex: Int): StringBuilder

Appends a subsequence of the specified character sequence value to this Appendable and returns this instance.

appendRange
Link copied to clipboard
fun appendRange(value: CharArray, startIndex: Int, endIndex: Int): StringBuilder

Appends characters in a subarray of the specified character array value to this string builder and returns this instance.

Since Kotlin

1.4
fun appendRange(value: CharSequence, startIndex: Int, endIndex: Int): StringBuilder

Appends a subsequence of the specified character sequence value to this string builder and returns this instance.

Since Kotlin

1.4
fun appendRange(value: CharArray, startIndex: Int, endIndex: Int): StringBuilder

Appends characters in a subarray of the specified character array value to this string builder and returns this instance.

Since Kotlin

1.4
fun appendRange(value: CharSequence, startIndex: Int, endIndex: Int): StringBuilder

Appends a subsequence of the specified character sequence value to this string builder and returns this instance.

Since Kotlin

1.4
capacity
Link copied to clipboard
expect fun capacity(): Int

Returns the current capacity of this string builder.

Since Kotlin

1.3
actual fun capacity(): Int

Returns the current capacity of this string builder.

Since Kotlin

1.3
actual fun capacity(): Int

Returns the current capacity of this string builder.

clear
Link copied to clipboard
fun clear(): StringBuilder

Clears the content of this string builder making it empty and returns this instance.

Since Kotlin

1.3
deleteAt
Link copied to clipboard
fun deleteAt(index: Int): StringBuilder

Removes the character at the specified index from this string builder and returns this instance.

Since Kotlin

1.4
fun deleteAt(index: Int): StringBuilder

Removes the character at the specified index from this string builder and returns this instance.

Since Kotlin

1.4
deleteRange
Link copied to clipboard
fun deleteRange(startIndex: Int, endIndex: Int): StringBuilder

Removes characters in the specified range from this string builder and returns this instance.

Since Kotlin

1.4
fun deleteRange(startIndex: Int, endIndex: Int): StringBuilder

Removes characters in the specified range from this string builder and returns this instance.

Since Kotlin

1.4
ensureCapacity
Link copied to clipboard
expect fun ensureCapacity(minimumCapacity: Int)

Ensures that the capacity of this string builder is at least equal to the specified minimumCapacity.

Since Kotlin

1.4
actual fun ensureCapacity(minimumCapacity: Int)

Ensures that the capacity of this string builder is at least equal to the specified minimumCapacity.

Since Kotlin

1.4
actual fun ensureCapacity(minimumCapacity: Int)

Ensures that the capacity of this string builder is at least equal to the specified minimumCapacity.

get
Link copied to clipboard
expect open operator override fun get(index: Int): Char
actual open operator override fun get(index: Int): Char

Returns the character at the specified index in this character sequence.

actual open operator override fun get(index: Int): Char

Returns the character at the specified index in this character sequence.

indexOf
Link copied to clipboard
expect fun indexOf(string: String): Int

Returns the index within this string builder of the first occurrence of the specified string.

Since Kotlin

1.4
expect fun indexOf(string: String, startIndex: Int): Int

Returns the index within this string builder of the first occurrence of the specified string, starting at the specified startIndex.

Since Kotlin

1.4
actual fun indexOf(string: String): Int

Returns the index within this string builder of the first occurrence of the specified string.

Since Kotlin

1.4
actual fun indexOf(string: String, startIndex: Int): Int

Returns the index within this string builder of the first occurrence of the specified string, starting at the specified startIndex.

Since Kotlin

1.4
actual fun indexOf(string: String): Int

Returns the index within this string builder of the first occurrence of the specified string.

Since Kotlin

1.4
actual fun indexOf(string: String, startIndex: Int): Int

Returns the index within this string builder of the first occurrence of the specified string, starting at the specified startIndex.

Since Kotlin

1.4
insert
Link copied to clipboard
expect fun insert(index: Int, value: Any?): StringBuilder

Inserts the string representation of the specified object value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
expect fun insert(index: Int, value: Boolean): StringBuilder

Inserts the string representation of the specified boolean value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
expect fun insert(index: Int, value: Char): StringBuilder

Inserts the specified character value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
expect fun insert(index: Int, value: CharArray): StringBuilder

Inserts characters in the specified character array value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
expect fun insert(index: Int, value: CharSequence?): StringBuilder

Inserts characters in the specified character sequence value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
expect fun insert(index: Int, value: String?): StringBuilder

Inserts the string value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
actual fun insert(index: Int, value: Any?): StringBuilder

Inserts the string representation of the specified object value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
actual fun insert(index: Int, value: Boolean): StringBuilder

Inserts the string representation of the specified boolean value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
actual fun insert(index: Int, value: Char): StringBuilder

Inserts the specified character value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
actual fun insert(index: Int, value: CharArray): StringBuilder

Inserts characters in the specified character array value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
actual fun insert(index: Int, value: CharSequence?): StringBuilder

Inserts characters in the specified character sequence value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
fun insert(index: Int, value: String): StringBuilder

actual fun insert(index: Int, value: String?): StringBuilder

Inserts the string value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
actual fun insert(index: Int, value: Any?): StringBuilder

Inserts the string representation of the specified object value into this string builder at the specified index and returns this instance.

actual fun insert(index: Int, value: Boolean): StringBuilder

Inserts the string representation of the specified boolean value into this string builder at the specified index and returns this instance.

fun insert(index: Int, value: Byte): StringBuilder
fun insert(index: Int, value: Double): StringBuilder
fun insert(index: Int, value: Float): StringBuilder
fun insert(index: Int, value: Int): StringBuilder
fun insert(index: Int, value: Long): StringBuilder
fun insert(index: Int, value: Short): StringBuilder
fun insert(index: Int, value: String): StringBuilder

actual fun insert(index: Int, value: Char): StringBuilder

Inserts the specified character value into this string builder at the specified index and returns this instance.

actual fun insert(index: Int, value: CharArray): StringBuilder

Inserts characters in the specified character array value into this string builder at the specified index and returns this instance.

actual fun insert(index: Int, value: CharSequence?): StringBuilder

Inserts characters in the specified character sequence value into this string builder at the specified index and returns this instance.

actual fun insert(index: Int, value: String?): StringBuilder

Inserts the string value into this string builder at the specified index and returns this instance.

insertRange
Link copied to clipboard
fun insertRange(index: Int, value: CharArray, startIndex: Int, endIndex: Int): StringBuilder

Inserts characters in a subarray of the specified character array value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
fun insertRange(index: Int, value: CharSequence, startIndex: Int, endIndex: Int): StringBuilder

Inserts characters in a subsequence of the specified character sequence value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
fun insertRange(index: Int, value: CharArray, startIndex: Int, endIndex: Int): StringBuilder

Inserts characters in a subarray of the specified character array value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
fun insertRange(index: Int, value: CharSequence, startIndex: Int, endIndex: Int): StringBuilder

Inserts characters in a subsequence of the specified character sequence value into this string builder at the specified index and returns this instance.

Since Kotlin

1.4
lastIndexOf
Link copied to clipboard
expect fun lastIndexOf(string: String): Int

Returns the index within this string builder of the last occurrence of the specified string. The last occurrence of empty string "" is considered to be at the index equal to this.length.

Since Kotlin

1.4
expect fun lastIndexOf(string: String, startIndex: Int): Int

Returns the index within this string builder of the last occurrence of the specified string, starting from the specified startIndex toward the beginning.

Since Kotlin

1.4
actual fun lastIndexOf(string: String): Int

Returns the index within this string builder of the last occurrence of the specified string. The last occurrence of empty string "" is considered to be at the index equal to this.length.

Since Kotlin

1.4
actual fun lastIndexOf(string: String, startIndex: Int): Int

Returns the index within this string builder of the last occurrence of the specified string, starting from the specified startIndex toward the beginning.

Since Kotlin

1.4
actual fun lastIndexOf(string: String): Int

Returns the index within this string builder of the last occurrence of the specified string. The last occurrence of empty string "" is considered to be at the index equal to this.length.

Since Kotlin

1.4
actual fun lastIndexOf(string: String, startIndex: Int): Int

Returns the index within this string builder of the last occurrence of the specified string, starting from the specified startIndex toward the beginning.

Since Kotlin

1.4
reverse
Link copied to clipboard
expect fun reverse(): StringBuilder

Reverses the contents of this string builder and returns this instance.

actual fun reverse(): StringBuilder

Reverses the contents of this string builder and returns this instance.

actual fun reverse(): StringBuilder

Reverses the contents of this string builder and returns this instance.

set
Link copied to clipboard
operator fun set(index: Int, value: Char)

Sets the character at the specified index to the specified value.

Since Kotlin

1.4
operator fun set(index: Int, value: Char)

Sets the character at the specified index to the specified value.

setLength
Link copied to clipboard
expect fun setLength(newLength: Int)

Sets the length of this string builder to the specified newLength.

Since Kotlin

1.4
actual fun setLength(newLength: Int)

Sets the length of this string builder to the specified newLength.

Since Kotlin

1.4
actual fun setLength(newLength: Int)

Sets the length of this string builder to the specified newLength.

setRange
Link copied to clipboard
fun setRange(startIndex: Int, endIndex: Int, value: String): StringBuilder

Replaces characters in the specified range of this string builder with characters in the specified string value and returns this instance.

Since Kotlin

1.4
fun setRange(startIndex: Int, endIndex: Int, value: String): StringBuilder

Replaces characters in the specified range of this string builder with characters in the specified string value and returns this instance.

Since Kotlin

1.4
subSequence
Link copied to clipboard
expect open override fun subSequence(startIndex: Int, endIndex: Int): CharSequence
actual open override fun subSequence(startIndex: Int, endIndex: Int): CharSequence

Returns a new character sequence that is a subsequence of this character sequence, starting at the specified startIndex and ending right before the specified endIndex.

actual open override fun subSequence(startIndex: Int, endIndex: Int): CharSequence

Returns a new character sequence that is a subsequence of this character sequence, starting at the specified startIndex and ending right before the specified endIndex.

substring
Link copied to clipboard
expect fun substring(startIndex: Int): String

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the length (exclusive).

Since Kotlin

1.4
expect fun substring(startIndex: Int, endIndex: Int): String

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the endIndex (exclusive).

Since Kotlin

1.4
actual fun substring(startIndex: Int): String

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the length (exclusive).

Since Kotlin

1.4
actual fun substring(startIndex: Int, endIndex: Int): String

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the endIndex (exclusive).

Since Kotlin

1.4
actual fun substring(startIndex: Int): String

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the length (exclusive).

Since Kotlin

1.4
actual fun substring(startIndex: Int, endIndex: Int): String

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the endIndex (exclusive).

toCharArray
Link copied to clipboard
fun toCharArray(destination: CharArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = this.length)

Copies characters from this string builder into the destination character array.

Since Kotlin

1.4
fun toCharArray(destination: CharArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = this.length)

Copies characters from this string builder into the destination character array.

Since Kotlin

1.4
toString
Link copied to clipboard
open override fun toString(): String
open override fun toString(): String
trimToSize
Link copied to clipboard
expect fun trimToSize()

Attempts to reduce storage used for this string builder.

Since Kotlin

1.4
actual fun trimToSize()

Attempts to reduce storage used for this string builder.

Since Kotlin

1.4
actual fun trimToSize()

Attempts to reduce storage used for this string builder.

Properties

length
Link copied to clipboard
expect open override val length: Int
actual open override val length: Int

Returns the length of this character sequence.

actual open override val length: Int

Returns the length of this character sequence.

Extensions

append
Link copied to clipboard
inline fun StringBuilder.append(obj: Any?): StringBuilder

fun StringBuilder.append(vararg value: String?): StringBuilder
fun StringBuilder.append(vararg value: Any?): StringBuilder

Appends all arguments to the given StringBuilder.

inline fun StringBuilder.append(it: Boolean): StringBuilder
inline fun StringBuilder.append(it: Byte): StringBuilder
inline fun StringBuilder.append(it: Short): StringBuilder
inline fun StringBuilder.append(it: Int): StringBuilder
inline fun StringBuilder.append(it: Long): StringBuilder
inline fun StringBuilder.append(it: Float): StringBuilder
inline fun StringBuilder.append(it: Double): StringBuilder
inline fun StringBuilder.append(it: String): StringBuilder
inline fun StringBuilder.append(it: CharArray): StringBuilder
appendLine
Link copied to clipboard
inline fun StringBuilder.appendLine(): StringBuilder

Appends a line feed character (\n) to this StringBuilder.

inline fun StringBuilder.appendLine(value: CharSequence?): StringBuilder
inline fun StringBuilder.appendLine(value: String?): StringBuilder
inline fun StringBuilder.appendLine(value: Any?): StringBuilder
inline fun StringBuilder.appendLine(value: CharArray): StringBuilder
inline fun StringBuilder.appendLine(value: Char): StringBuilder
inline fun StringBuilder.appendLine(value: Boolean): StringBuilder

Appends value to this StringBuilder, followed by a line feed character (\n).

inline fun StringBuilder.appendLine(value: StringBuffer?): StringBuilder
inline fun StringBuilder.appendLine(value: StringBuilder?): StringBuilder
inline fun StringBuilder.appendLine(value: Int): StringBuilder
inline fun StringBuilder.appendLine(value: Short): StringBuilder
inline fun StringBuilder.appendLine(value: Byte): StringBuilder
inline fun StringBuilder.appendLine(value: Long): StringBuilder
inline fun StringBuilder.appendLine(value: Float): StringBuilder
inline fun StringBuilder.appendLine(value: Double): StringBuilder

Appends value to this StringBuilder, followed by a line feed character (\n).

inline fun StringBuilder.appendLine(value: Byte): StringBuilder
inline fun StringBuilder.appendLine(value: Short): StringBuilder
inline fun StringBuilder.appendLine(value: Int): StringBuilder
inline fun StringBuilder.appendLine(value: Long): StringBuilder
inline fun StringBuilder.appendLine(value: Float): StringBuilder
inline fun StringBuilder.appendLine(value: Double): StringBuilder

Appends value to this StringBuilder, followed by a line feed character (\n).

appendln
Link copied to clipboard
fun StringBuilder.appendln(): StringBuilder

Appends a line separator to this StringBuilder.

inline fun StringBuilder.appendln(value: StringBuffer?): StringBuilder
inline fun StringBuilder.appendln(value: CharSequence?): StringBuilder
inline fun StringBuilder.appendln(value: String?): StringBuilder
inline fun StringBuilder.appendln(value: Any?): StringBuilder
inline fun StringBuilder.appendln(value: StringBuilder?): StringBuilder
inline fun StringBuilder.appendln(value: CharArray): StringBuilder
inline fun StringBuilder.appendln(value: Char): StringBuilder
inline fun StringBuilder.appendln(value: Boolean): StringBuilder
inline fun StringBuilder.appendln(value: Int): StringBuilder
inline fun StringBuilder.appendln(value: Short): StringBuilder
inline fun StringBuilder.appendln(value: Byte): StringBuilder
inline fun StringBuilder.appendln(value: Long): StringBuilder
inline fun StringBuilder.appendln(value: Float): StringBuilder
inline fun StringBuilder.appendln(value: Double): StringBuilder

Appends value to this StringBuilder, followed by a line separator.

fun StringBuilder.appendln(it: String): StringBuilder
fun StringBuilder.appendln(it: Boolean): StringBuilder
fun StringBuilder.appendln(it: Byte): StringBuilder
fun StringBuilder.appendln(it: Short): StringBuilder
fun StringBuilder.appendln(it: Int): StringBuilder
fun StringBuilder.appendln(it: Long): StringBuilder
fun StringBuilder.appendln(it: Float): StringBuilder
fun StringBuilder.appendln(it: Double): StringBuilder
fun StringBuilder.appendln(it: Any?): StringBuilder
fun StringBuilder.appendln(): StringBuilder
appendRange
Link copied to clipboard
expect fun StringBuilder.appendRange(value: CharArray, startIndex: Int, endIndex: Int): StringBuilder

Appends characters in a subarray of the specified character array value to this string builder and returns this instance.

expect fun StringBuilder.appendRange(value: CharSequence, startIndex: Int, endIndex: Int): StringBuilder

Appends a subsequence of the specified character sequence value to this string builder and returns this instance.

actual inline fun StringBuilder.appendRange(value: CharArray, startIndex: Int, endIndex: Int): StringBuilder

Appends characters in a subarray of the specified character array value to this string builder and returns this instance.

actual inline fun StringBuilder.appendRange(value: CharSequence, startIndex: Int, endIndex: Int): StringBuilder

Appends a subsequence of the specified character sequence value to this string builder and returns this instance.

actual inline fun StringBuilder.appendRange(value: CharArray, startIndex: Int, endIndex: Int): StringBuilder

Appends characters in a subarray of the specified character array value to this string builder and returns this instance.

actual inline fun StringBuilder.appendRange(value: CharSequence, startIndex: Int, endIndex: Int): StringBuilder

Appends a subsequence of the specified character sequence value to this string builder and returns this instance.

clear
Link copied to clipboard
expect fun StringBuilder.clear(): StringBuilder

Clears the content of this string builder making it empty and returns this instance.

actual inline fun StringBuilder.clear(): StringBuilder

Clears the content of this string builder making it empty and returns this instance.

actual fun StringBuilder.clear(): StringBuilder

Clears the content of this string builder making it empty and returns this instance.

deleteAt
Link copied to clipboard
expect fun StringBuilder.deleteAt(index: Int): StringBuilder

Removes the character at the specified index from this string builder and returns this instance.

actual inline fun StringBuilder.deleteAt(index: Int): StringBuilder

Removes the character at the specified index from this string builder and returns this instance.

actual inline fun StringBuilder.deleteAt(index: Int): StringBuilder

Removes the character at the specified index from this string builder and returns this instance.

deleteCharAt
Link copied to clipboard
inline fun StringBuilder.deleteCharAt(index: Int): StringBuilder

Removes the character at the specified index from this string builder and returns this instance.

deleteRange
Link copied to clipboard
expect fun StringBuilder.deleteRange(startIndex: Int, endIndex: Int): StringBuilder

Removes characters in the specified range from this string builder and returns this instance.

actual inline fun StringBuilder.deleteRange(startIndex: Int, endIndex: Int): StringBuilder

Removes characters in the specified range from this string builder and returns this instance.

actual inline fun StringBuilder.deleteRange(startIndex: Int, endIndex: Int): StringBuilder

Removes characters in the specified range from this string builder and returns this instance.

ensureCapacity
Link copied to clipboard
inline fun StringBuilder.ensureCapacity(capacity: Int)
insert
Link copied to clipboard
inline fun StringBuilder.insert(index: Int, c: Char): StringBuilder
inline fun StringBuilder.insert(index: Int, chars: CharArray): StringBuilder
inline fun StringBuilder.insert(index: Int, csq: CharSequence?): StringBuilder
inline fun StringBuilder.insert(index: Int, string: String): StringBuilder

inline fun StringBuilder.insert(index: Int, csq: CharSequence?, start: Int, end: Int): StringBuilder

Inserts characters in a subsequence of the specified character sequence csq into this string builder at the specified index and returns this instance.

insertRange
Link copied to clipboard
expect fun StringBuilder.insertRange(index: Int, value: CharArray, startIndex: Int, endIndex: Int): StringBuilder

Inserts characters in a subarray of the specified character array value into this string builder at the specified index and returns this instance.

expect fun StringBuilder.insertRange(index: Int, value: CharSequence, startIndex: Int, endIndex: Int): StringBuilder

Inserts characters in a subsequence of the specified character sequence value into this string builder at the specified index and returns this instance.

actual inline fun StringBuilder.insertRange(index: Int, value: CharArray, startIndex: Int, endIndex: Int): StringBuilder

Inserts characters in a subarray of the specified character array value into this string builder at the specified index and returns this instance.

actual inline fun StringBuilder.insertRange(index: Int, value: CharSequence, startIndex: Int, endIndex: Int): StringBuilder

Inserts characters in a subsequence of the specified character sequence value into this string builder at the specified index and returns this instance.

actual inline fun StringBuilder.insertRange(index: Int, value: CharArray, startIndex: Int, endIndex: Int): StringBuilder

Inserts characters in a subarray of the specified character array value into this string builder at the specified index and returns this instance.

actual inline fun StringBuilder.insertRange(index: Int, value: CharSequence, startIndex: Int, endIndex: Int): StringBuilder

Inserts characters in a subsequence of the specified character sequence value into this string builder at the specified index and returns this instance.

set
Link copied to clipboard
expect operator fun StringBuilder.set(index: Int, value: Char)

Sets the character at the specified index to the specified value.

actual inline operator fun StringBuilder.set(index: Int, value: Char)

Sets the character at the specified index to the specified value.

actual inline operator fun StringBuilder.set(index: Int, value: Char)

Sets the character at the specified index to the specified value.

setCharAt
Link copied to clipboard
inline fun StringBuilder.setCharAt(index: Int, value: Char)
setLength
Link copied to clipboard
inline fun StringBuilder.setLength(l: Int)
setRange
Link copied to clipboard
expect fun StringBuilder.setRange(startIndex: Int, endIndex: Int, value: String): StringBuilder

Replaces characters in the specified range of this string builder with characters in the specified string value and returns this instance.

actual inline fun StringBuilder.setRange(startIndex: Int, endIndex: Int, value: String): StringBuilder

Replaces characters in the specified range of this string builder with characters in the specified string value and returns this instance.

actual inline fun StringBuilder.setRange(startIndex: Int, endIndex: Int, value: String): StringBuilder

Replaces characters in the specified range of this string builder with characters in the specified string value and returns this instance.

toCharArray
Link copied to clipboard
expect fun StringBuilder.toCharArray(destination: CharArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = this.length)

Copies characters from this string builder into the destination character array.

actual inline fun StringBuilder.toCharArray(destination: CharArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = this.length)

Copies characters from this string builder into the destination character array.

actual inline fun StringBuilder.toCharArray(destination: CharArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = this.length)

Copies characters from this string builder into the destination character array.