Skip to content

Commit 084a409

Browse files
committed
correct tab label
1 parent 2168ef9 commit 084a409

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_zh-cn/overviews/scala3-book/string-interpolation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ println(s"$name is $age years old") // "James is 30 years old"
3636

3737
`s` 放在字符串前,只是 Scala 提供的插值的一种可能。
3838

39-
Scala 内置三种字符串插值方法: `s`, `f` 和 raw`.
39+
Scala 内置三种字符串插值方法: `s`, `f``raw`.
4040
进一步,字符串插值器只是一种特殊的方法,所以你也可以定义自己的插值器。例如,
4141
有些数据库的函数库定义了 `sql` 插值器,这个插值器可以返回数据库查询。
4242

@@ -140,7 +140,7 @@ println(f"$name%s is $height%2.2f meters tall") // "James is 1.90 meters tall"
140140
`f` 插值器是类型安全的。如果你尝试把一个双精度数传递给一个只能处理整数的格式化字符串,编译器会发出一个错误信息。
141141
例如:
142142

143-
{% tabs f-inspector-error class=tabs-scala-version %}
143+
{% tabs f-interpolator-error class=tabs-scala-version %}
144144

145145
{% tab 'Scala 2' for=f-interpolator-error %}
146146
```scala

0 commit comments

Comments
 (0)