Skip to content

Commit 8cee21a

Browse files
committed
Update string interpolation docs to remove incorrect guidance
1 parent 4a9d906 commit 8cee21a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

_overviews/core/string-interpolation.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,11 @@ To represent an actual dollar sign you can double it `$$`, like here:
4949

5050
which will print the string `New offers starting at $14.99`.
5151

52-
Double quotes also need to be escaped. This can be done on an individual basis using a backslash before the double quote, as follows:
53-
54-
val person = "{\"name\":\"James\"}"
55-
56-
On longer strings, this may be time intensive. To avoid the need to escape every individual quote, triple quotes can be used as shown:
52+
Double quotes also need to be escaped. This can be done by using triple quotes as shown:
5753

5854
val person = """{"name":"James"}"""
5955

60-
Both of these strings, when printed, will produce the string `{"name":"James"}`.
56+
which will produce the string `{"name":"James"}` when printed.
6157

6258
### The `f` Interpolator
6359

0 commit comments

Comments
 (0)