0
이스케이프 시퀀스와 관련된 다음 문자열 서식 문제를 해결하려면 어떻게해야합니까?스칼라 문자열 형식 : 이스케이프 시퀀스
[~] 17:34:04$ scala
Welcome to Scala 2.11.8 (OpenJDK 64-Bit Server VM, Java 1.8.0_151).
Type in expressions for evaluation. Or try :help.
scala> val fullFootnoteId = "asdf"
fullFootnoteId: String = asdf
scala> val footnoteId = 1
footnoteId: Int = 1
scala> val footnoteTag = s"<sup id=\"ref_${fullFootnoteId}\"><a href=\"#foot_${fullFootnoteId}\">${footnoteId}</a></sup>"
<console>:12: error: value ref_$ is not a member of String
val footnoteTag = s"<sup id=\"ref_${fullFootnoteId}\"><a href=\"#foot_${fullFootnoteId}\">${footnoteId}</a></sup>"
^
<console>:12: error: value \ is not a member of String
val footnoteTag = s"<sup id=\"ref_${fullFootnoteId}\"><a href=\"#foot_${fullFootnoteId}\">${footnoteId}</a></sup>"
^