DEV Community

Discussion on: Margin Indentation In Strings | Problem

Collapse
 
theimpulson profile image
Aayush Gupta • Edited

Replace : in .trimMargin(marginPrefix: ">") method with =
Also, you have used 4 double quotes at the end of the string, might want to fix that too.

fun main(args: Array <String>){
    val rawCrawl1= """>A long time ago,
    >a glaxy
    >far, far, away.
    >BUMM BUMM BUMMMM""".trimMargin(marginPrefix= ">")
    println(rawCrawl1)

}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
robiabo profile image
Robiabo

I applied what you mentioned and it works. Thanks a lot.