Skip to content

Commit b0425a6

Browse files
committed
Fixes example snippet
1 parent afe134e commit b0425a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/StringUnicodeScalarView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ extension String.UnicodeScalarIndex {
365365
/// in the string.
366366
///
367367
/// let cafe = "Café 🍵"
368-
/// let i = cafe.unicodeScalars.firstIndex(of: "🍵")
368+
/// let i = cafe.unicodeScalars.firstIndex(of: "🍵")!
369369
/// let j = i.samePosition(in: cafe)!
370370
/// print(cafe[j...])
371371
/// // Prints "🍵"

0 commit comments

Comments
 (0)