Quick actions

cmd+k|ctrl+k

Navigation

Languages

Scope Function with Lambda Receiver (Run)

Snippet info

Language

Kotlin

Visibility

public

Author

habib17

Created

2019-11-02T00:57:24Z

Updated

2019-11-02T00:57:24Z

fun main(args : Array<String>){
    val text = "Hello"
    val result = text.run {
        val from = this
        val to = this.replace("Hello", "Kotlin")
        "replace text from $from to $to"
    }
    println("result : $result")
    
 
}
INFO