• 로그인 함 해보끄나?

  • Sarangnamu.net June 17, 2003
    Home Login Profile Study Open Project Q&A Google Code
    kotlin trim intent and trim margin
    Last Modify : 30 January, 2019(03:51)
    https://discuss.kotlinlang.org/t/multiline-string-literal-indent-handling-is-unconvient/497/2 https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/trim-margin.html val withoutMargin1 = """ABC |123 |456""".trimMargin() println(withoutMargin1) // ABC\n123\n456 val withoutMargin2 = """ #XYZ #foo #bar """.trimMargin("#") println(withoutMargin2) // XYZ\nfoo\nbar https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/trim-indent.html val withoutIndent = """ ABC 123 456 """.trimIndent() println(withoutIndent) // ABC\n123\n456

    Comment


    입력하3 1563420133



    Locations of visitors to this page