Rename Appendable methods parameters
This commit is contained in:
@@ -10,28 +10,28 @@ package kotlin.text
|
||||
*/
|
||||
public actual interface Appendable {
|
||||
/**
|
||||
* Appends the specified character [c] to this Appendable and returns this instance.
|
||||
* Appends the specified character [value] to this Appendable and returns this instance.
|
||||
*
|
||||
* @param c the character to append.
|
||||
* @param value the character to append.
|
||||
*/
|
||||
public actual fun append(c: Char): Appendable
|
||||
public actual fun append(value: Char): Appendable
|
||||
|
||||
/**
|
||||
* Appends the specified character sequence [csq] to this Appendable and returns this instance.
|
||||
* Appends the specified character sequence [value] to this Appendable and returns this instance.
|
||||
*
|
||||
* @param csq the character sequence to append. If [csq] is `null`, then the four characters `"null"` are appended to this Appendable.
|
||||
* @param value the character sequence to append. If [value] is `null`, then the four characters `"null"` are appended to this Appendable.
|
||||
*/
|
||||
public actual fun append(csq: CharSequence?): Appendable
|
||||
public actual fun append(value: CharSequence?): Appendable
|
||||
|
||||
/**
|
||||
* Appends a subsequence of the specified character sequence [csq] to this Appendable and returns this instance.
|
||||
* Appends a subsequence of the specified character sequence [value] to this Appendable and returns this instance.
|
||||
*
|
||||
* @param csq the character sequence from which a subsequence is appended. If [csq] is `null`,
|
||||
* then characters are appended as if [csq] contained the four characters `"null"`.
|
||||
* @param start the beginning (inclusive) of the subsequence to append.
|
||||
* @param end the end (exclusive) of the subsequence to append.
|
||||
* @param value the character sequence from which a subsequence is appended. If [value] is `null`,
|
||||
* then characters are appended as if [value] contained the four characters `"null"`.
|
||||
* @param startIndex the beginning (inclusive) of the subsequence to append.
|
||||
* @param endIndex the end (exclusive) of the subsequence to append.
|
||||
*
|
||||
* @throws IndexOutOfBoundsException or [IllegalArgumentException] when [start] or [end] is out of range of the [csq] character sequence indices or when `start > end`.
|
||||
* @throws IndexOutOfBoundsException or [IllegalArgumentException] when [startIndex] or [endIndex] is out of range of the [value] character sequence indices or when `startIndex > endIndex`.
|
||||
*/
|
||||
public actual fun append(csq: CharSequence?, start: Int, end: Int): Appendable
|
||||
public actual fun append(value: CharSequence?, startIndex: Int, endIndex: Int): Appendable
|
||||
}
|
||||
@@ -36,18 +36,18 @@ public actual class StringBuilder actual constructor(content: String) : Appendab
|
||||
|
||||
actual override fun subSequence(startIndex: Int, endIndex: Int): CharSequence = string.substring(startIndex, endIndex)
|
||||
|
||||
actual override fun append(c: Char): StringBuilder {
|
||||
string += c
|
||||
actual override fun append(value: Char): StringBuilder {
|
||||
string += value
|
||||
return this
|
||||
}
|
||||
|
||||
actual override fun append(csq: CharSequence?): StringBuilder {
|
||||
string += csq.toString()
|
||||
actual override fun append(value: CharSequence?): StringBuilder {
|
||||
string += value.toString()
|
||||
return this
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalStdlibApi::class)
|
||||
actual override fun append(csq: CharSequence?, start: Int, end: Int): StringBuilder = this.appendRange(csq, start, end)
|
||||
actual override fun append(value: CharSequence?, startIndex: Int, endIndex: Int): StringBuilder = this.appendRange(value, startIndex, endIndex)
|
||||
|
||||
/**
|
||||
* Reverses the contents of this string builder and returns this instance.
|
||||
|
||||
Reference in New Issue
Block a user