Files
Simple-Contacts/app/src/main/kotlin/com/simplemobiletools/contacts/overloads/String.kt
Nikola Trubitsyn 9c44837d0c Use StringBuilder in String.times()
Has better performance than StringBuffer
2017-12-26 01:44:21 +03:00

10 lines
202 B
Kotlin

package com.simplemobiletools.contacts.overloads
operator fun String.times(x: Int): String {
val sb = StringBuilder()
for (i in 1..x) {
sb.append(this)
}
return sb.toString()
}