Make consistent parameter nullability with appendLine

This commit is contained in:
Abduqodiri Qurbonzoda
2020-05-29 01:37:33 +03:00
parent e05eeea6cd
commit 1bd63bb07f
3 changed files with 20 additions and 6 deletions
@@ -77,9 +77,11 @@ expect class StringBuilder : Appendable, CharSequence {
/**
* Appends the specified string [value] to this string builder and returns this instance.
*
* If [value] is `null`, then the four characters `"null"` are appended.
*/
@SinceKotlin("1.3")
fun append(value: String): StringBuilder
fun append(value: String?): StringBuilder
/**
* Returns the current capacity of this string builder.
@@ -200,11 +202,13 @@ expect class StringBuilder : Appendable, CharSequence {
/**
* Inserts the string [value] into this string builder at the specified [index] and returns this instance.
*
* If [value] is `null`, then the four characters `"null"` are inserted.
*
* @throws IndexOutOfBoundsException if [index] is less than zero or greater than the length of this string builder.
*/
@SinceKotlin("1.4")
@WasExperimental(ExperimentalStdlibApi::class)
fun insert(index: Int, value: String): StringBuilder
fun insert(index: Int, value: String?): StringBuilder
/**
* Sets the length of this string builder to the specified [newLength].