mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 00:21:29 +00:00
17 lines
374 B
Plaintext
17 lines
374 B
Plaintext
|
|
class C() {
|
|
fun Any.toMyPrefixedString(prefix: String = "", suffix: String="") : String = prefix + " " + suffix
|
|
|
|
fun testReceiver() : String {
|
|
val res : String = "mama".toMyPrefixedString("111", "222")
|
|
System.out?.println(res)
|
|
return res
|
|
}
|
|
|
|
}
|
|
|
|
fun box() : String {
|
|
if(C().testReceiver() != "111 222") return "fail"
|
|
return "OK"
|
|
}
|