Skip to content

Instantly share code, notes, and snippets.

@phenan
Created February 8, 2018 02:51
Show Gist options
  • Save phenan/8ca7b2604bf840459d8582673e75bd6d to your computer and use it in GitHub Desktop.
Save phenan/8ca7b2604bf840459d8582673e75bd6d to your computer and use it in GitHub Desktop.
StringContext の仕様を確かめるコード
case class StringContext (ss: String*) {
def s (n: Int): String = ss(n)
}
object StringContextTest {
def main (args: Array[String]): Unit = {
println(s"foo${1}bar") // print bar (not foo1bar)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment