String interpolation, escaping quotation mark

后端 未结 1 470
醉话见心
醉话见心 2020-12-19 11:08

I\'m somewhat baffled by how difficult this turns out to be. I\'ve already looked around stackoverflow, but no solution seems to work fine for me.

What I want to do:

相关标签:
1条回答
  • 2020-12-19 11:44

    Use triple quotation mark:

    scala> s"""File "$file" found!"""
    res0: String = File "blubb" found!
    
    0 讨论(0)
提交回复
热议问题