Skip to content

Commit 0fef4b1

Browse files
committed
about quotes in string interpolation
1 parent 751d0a7 commit 0fef4b1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bk1ch03p086string/bk1ch03p086string/ViewController.swift

+6
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ class ViewController: UIViewController {
167167
let s = "You have \(m + n) widgets."
168168
print(s)
169169
}
170+
171+
do {
172+
// why did I never notice this before?
173+
let s = "You have \("numerous".uppercased()) widgets"
174+
print(s)
175+
}
170176

171177
do {
172178
// silly example of custom interpolation

0 commit comments

Comments
 (0)