Core API – Kotlin Programming Language (original) (raw)
repeat
Returns a string containing this char sequence repeated n times.
Since Kotlin
1.0
Samples
import kotlin.test.*
fun main() {
//sampleStart
println("Word".repeat(4)) // WordWordWordWord
println("Word".repeat(0)) //
//sampleEnd
}Returns a string containing this char sequence repeated n times.
Since Kotlin
1.1
Samples
import kotlin.test.*
fun main() {
//sampleStart
println("Word".repeat(4)) // WordWordWordWord
println("Word".repeat(0)) //
//sampleEnd
}Returns a string containing this char sequence repeated n times.
Since Kotlin
1.0
Samples
import kotlin.test.*
fun main() {
//sampleStart
println("Word".repeat(4)) // WordWordWordWord
println("Word".repeat(0)) //
//sampleEnd
}Returns a string containing this char sequence repeated n times.
Since Kotlin
1.3
Samples
import kotlin.test.*
fun main() {
//sampleStart
println("Word".repeat(4)) // WordWordWordWord
println("Word".repeat(0)) //
//sampleEnd
}Returns a string containing this char sequence repeated n times.
Since Kotlin
1.8
Samples
import kotlin.test.*
fun main() {
//sampleStart
println("Word".repeat(4)) // WordWordWordWord
println("Word".repeat(0)) //
//sampleEnd
}Returns a string containing this char sequence repeated n times.
Since Kotlin
1.8
Samples
import kotlin.test.*
fun main() {
//sampleStart
println("Word".repeat(4)) // WordWordWordWord
println("Word".repeat(0)) //
//sampleEnd
}