Fixes example snippet

This commit is contained in:
Valeriy Van
2020-04-26 22:08:27 +02:00
parent afe134eb2e
commit b0425a6cd8

View File

@@ -365,7 +365,7 @@ extension String.UnicodeScalarIndex {
/// in the string.
///
/// let cafe = "Café 🍵"
/// let i = cafe.unicodeScalars.firstIndex(of: "🍵")
/// let i = cafe.unicodeScalars.firstIndex(of: "🍵")!
/// let j = i.samePosition(in: cafe)!
/// print(cafe[j...])
/// // Prints "🍵"