Skip to content

Commit aa9efae

Browse files
author
Jans Pavlovs
committed
Update map example code
Changes deprecated lowercaseString calls to lowercased() This commit only affects example code provided in comments
1 parent 0d87c2d commit aa9efae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/core/Sequence.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ public protocol Sequence {
363363
/// to lowercase strings and then to count their characters.
364364
///
365365
/// let cast = ["Vivien", "Marlon", "Kim", "Karl"]
366-
/// let lowercaseNames = cast.map { $0.lowercaseString }
366+
/// let lowercaseNames = cast.map { $0.lowercased() }
367367
/// // 'lowercaseNames' == ["vivien", "marlon", "kim", "karl"]
368368
/// let letterCounts = cast.map { $0.characters.count }
369369
/// // 'letterCounts' == [6, 6, 3, 4]
@@ -798,7 +798,7 @@ extension Sequence {
798798
/// to lowercase strings and then to count their characters.
799799
///
800800
/// let cast = ["Vivien", "Marlon", "Kim", "Karl"]
801-
/// let lowercaseNames = cast.map { $0.lowercaseString }
801+
/// let lowercaseNames = cast.map { $0.lowercased() }
802802
/// // 'lowercaseNames' == ["vivien", "marlon", "kim", "karl"]
803803
/// let letterCounts = cast.map { $0.characters.count }
804804
/// // 'letterCounts' == [6, 6, 3, 4]

0 commit comments

Comments
 (0)