Skip to content

Commit 35c191a

Browse files
committed
Fixes example snippets in UnicodeScalar.swift
1 parent b121ce9 commit 35c191a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stdlib/public/core/UnicodeScalar.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extension Unicode {
2929
/// You can also create Unicode scalar values directly from their numeric
3030
/// representation.
3131
///
32-
/// let airplane = Unicode.Scalar(9992)
32+
/// let airplane = Unicode.Scalar(9992)!
3333
/// print(airplane)
3434
/// // Prints "✈︎"
3535
@frozen
@@ -171,7 +171,7 @@ extension Unicode.Scalar :
171171
/// Scalar values representing characters that are normally unprintable or
172172
/// that otherwise require escaping are escaped with a backslash.
173173
///
174-
/// let tab = Unicode.Scalar(9)
174+
/// let tab = Unicode.Scalar(9)!
175175
/// print(tab)
176176
/// // Prints " "
177177
/// print(tab.escaped(asASCII: false))
@@ -182,7 +182,7 @@ extension Unicode.Scalar :
182182
/// value; otherwise, non-ASCII characters are represented using their
183183
/// typical string value.
184184
///
185-
/// let bap = Unicode.Scalar(48165)
185+
/// let bap = Unicode.Scalar(48165)!
186186
/// print(bap.escaped(asASCII: false))
187187
/// // Prints "밥"
188188
/// print(bap.escaped(asASCII: true))
@@ -323,7 +323,7 @@ extension Unicode.Scalar {
323323
/// with a value of an emoji character:
324324
///
325325
/// let codepoint = 127881
326-
/// let emoji = Unicode.Scalar(codepoint)
326+
/// let emoji = Unicode.Scalar(codepoint)!
327327
/// print(emoji)
328328
/// // Prints "🎉"
329329
///

0 commit comments

Comments
 (0)