Skip to content

Commit 5669dbc

Browse files
authored
Fixes example snippets in UTF16.swift (#31520)
1 parent 1e9bc9f commit 5669dbc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

stdlib/public/core/UTF16.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ extension Unicode.UTF16 {
5555
/// pair*.
5656
///
5757
/// let apple: Unicode.Scalar = "🍎"
58-
/// print(UTF16.leadSurrogate(apple)
58+
/// print(UTF16.leadSurrogate(apple))
5959
/// // Prints "55356"
6060
///
6161
/// - Parameter x: A Unicode scalar value. `x` must be represented by a
@@ -79,7 +79,7 @@ extension Unicode.UTF16 {
7979
/// pair*.
8080
///
8181
/// let apple: Unicode.Scalar = "🍎"
82-
/// print(UTF16.trailSurrogate(apple)
82+
/// print(UTF16.trailSurrogate(apple))
8383
/// // Prints "57166"
8484
///
8585
/// - Parameter x: A Unicode scalar value. `x` must be represented by a
@@ -186,11 +186,11 @@ extension Unicode.UTF16 {
186186
/// print(Array(bytes))
187187
/// // Prints "[70, 101, 114, 109, 97, 116, 97, 32, 240, 157, 132, 144]"
188188
///
189-
/// let result = transcodedLength(of: bytes.makeIterator(),
190-
/// decodedAs: UTF8.self,
191-
/// repairingIllFormedSequences: false)
189+
/// let result = UTF16.transcodedLength(of: bytes.makeIterator(),
190+
/// decodedAs: UTF8.self,
191+
/// repairingIllFormedSequences: false)
192192
/// print(result)
193-
/// // Prints "Optional((10, false))"
193+
/// // Prints "Optional((count: 10, isASCII: false))"
194194
///
195195
/// - Parameters:
196196
/// - input: An iterator of code units to be translated, encoded as

0 commit comments

Comments
 (0)