mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fixes example snippet
This commit is contained in:
@@ -365,7 +365,7 @@ extension String.UnicodeScalarIndex {
|
|||||||
/// in the string.
|
/// in the string.
|
||||||
///
|
///
|
||||||
/// let cafe = "Café 🍵"
|
/// let cafe = "Café 🍵"
|
||||||
/// let i = cafe.unicodeScalars.firstIndex(of: "🍵")
|
/// let i = cafe.unicodeScalars.firstIndex(of: "🍵")!
|
||||||
/// let j = i.samePosition(in: cafe)!
|
/// let j = i.samePosition(in: cafe)!
|
||||||
/// print(cafe[j...])
|
/// print(cafe[j...])
|
||||||
/// // Prints "🍵"
|
/// // Prints "🍵"
|
||||||
|
|||||||
Reference in New Issue
Block a user