Fix CharSequence.repeat doc
This commit is contained in:
@@ -192,6 +192,11 @@ internal expect fun String.nativeLastIndexOf(str: String, fromIndex: Int): Int
|
|||||||
public expect fun String.substring(startIndex: Int): String
|
public expect fun String.substring(startIndex: Int): String
|
||||||
public expect fun String.substring(startIndex: Int, endIndex: Int): String
|
public expect fun String.substring(startIndex: Int, endIndex: Int): String
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a string containing this char sequence repeated [n] times.
|
||||||
|
* @throws [IllegalArgumentException] when n < 0.
|
||||||
|
* @sample samples.text.Strings.repeat
|
||||||
|
*/
|
||||||
public expect fun CharSequence.repeat(n: Int): String
|
public expect fun CharSequence.repeat(n: Int): String
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ public actual fun String.decapitalize(): String {
|
|||||||
/**
|
/**
|
||||||
* Returns a string containing this char sequence repeated [n] times.
|
* Returns a string containing this char sequence repeated [n] times.
|
||||||
* @throws [IllegalArgumentException] when n < 0.
|
* @throws [IllegalArgumentException] when n < 0.
|
||||||
|
* @sample samples.text.Strings.repeat
|
||||||
*/
|
*/
|
||||||
public actual fun CharSequence.repeat(n: Int): String {
|
public actual fun CharSequence.repeat(n: Int): String {
|
||||||
require(n >= 0) { "Count 'n' must be non-negative, but was $n." }
|
require(n >= 0) { "Count 'n' must be non-negative, but was $n." }
|
||||||
|
|||||||
Reference in New Issue
Block a user