Extensions for java.lang.StringBuilder
appendln
Appends a line separator to this StringBuilder.
fun StringBuilder.appendln(): StringBuilder
Appends value to this StringBuilder, followed by a line separator.
fun StringBuilder.appendln(
value: StringBuffer?
): StringBuilder
fun StringBuilder.appendln(
value: CharSequence?
): StringBuilder
fun StringBuilder.appendln(value: String?): StringBuilder
fun StringBuilder.appendln(value: Any?): StringBuilder
fun StringBuilder.appendln(
value: StringBuilder?
): StringBuilder
fun StringBuilder.appendln(value: CharArray): StringBuilder
fun StringBuilder.appendln(value: Char): StringBuilder
fun StringBuilder.appendln(value: Boolean): StringBuilder
fun StringBuilder.appendln(value: Int): StringBuilder
fun StringBuilder.appendln(value: Short): StringBuilder
fun StringBuilder.appendln(value: Byte): StringBuilder
fun StringBuilder.appendln(value: Long): StringBuilder
fun StringBuilder.appendln(value: Float): StringBuilder
fun StringBuilder.appendln(value: Double): StringBuilder
appendRange
Appends characters in a subarray of the specified character array value to this string builder and returns this instance.
fun StringBuilder.appendRange(
value: CharArray,
startIndex: Int,
endIndex: Int
): StringBuilder
Appends a subsequence of the specified character sequence value to this string builder and returns this instance.
fun StringBuilder.appendRange(
value: CharSequence?,
startIndex: Int,
endIndex: Int
): StringBuilder
clear
Clears the content of this string builder making it empty and returns this instance.
fun StringBuilder.clear(): StringBuilder
deleteAt
Removes the character at the specified index from this string builder and returns this instance.
fun StringBuilder.deleteAt(index: Int): StringBuilder
deleteRange
Removes characters in the specified range from this string builder and returns this instance.
fun StringBuilder.deleteRange(
startIndex: Int,
endIndex: Int
): StringBuilder
insertRange
Inserts characters in a subarray of the specified character array value into this string builder at the specified index and returns this instance.
fun StringBuilder.insertRange(
index: Int,
value: CharArray,
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.
fun StringBuilder.insertRange(
index: Int,
value: CharSequence?,
startIndex: Int,
endIndex: Int
): StringBuilder
set
Sets the character at the specified index to the specified value.
operator fun StringBuilder.set(index: Int, value: Char)
setRange
Replaces characters in the specified range of this string builder with characters in the specified string value and returns this instance.
fun StringBuilder.setRange(
startIndex: Int,
endIndex: Int,
value: String
): StringBuilder
toCharArray
Copies characters from this string builder into the destination character array.
fun StringBuilder.toCharArray(
destination: CharArray,
destinationOffset: Int = 0,
startIndex: Int = 0,
endIndex: Int = this.length)