Skip to content

Commit 2df17f2

Browse files
committed
[stdlib] Minor doc edits
1 parent 1698fd3 commit 2df17f2

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

stdlib/public/core/StringIndexConversions.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ extension String.Index {
1616
///
1717
/// If the index passed as `sourcePosition` represents the start of an
1818
/// extended grapheme cluster---the element type of a string---then the
19-
/// initializer succeeds. If the index instead represents the position of a
20-
/// Unicode scalar within an extended grapheme cluster or the position of an
21-
/// encoded Unicode scalar value, the result is `nil`.
19+
/// initializer succeeds.
2220
///
2321
/// The following example converts the position of the Unicode scalar `"e"`
2422
/// into its corresponding position in the string. The character at that
@@ -43,7 +41,7 @@ extension String.Index {
4341
/// let nextScalarsIndex = cafe.unicodeScalars.index(after: scalarsIndex)
4442
/// let nextStringIndex = String.Index(nextScalarsIndex, within: cafe)
4543
///
46-
/// print(nextIndex)
44+
/// print(nextStringIndex)
4745
/// // Prints "nil"
4846
///
4947
/// - Parameters:

stdlib/public/core/UnsafeRawBufferPointer.swift.gyb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@ public struct Unsafe${Mutable}RawBufferPointer
507507
/// Initializes the buffer's memory with the given elements, binding the
508508
/// initialized memory to the elements' type.
509509
///
510-
/// When calling the `initialize(as:from:)` method on a buffer `b`, the
511-
/// memory referenced by `b` must be uninitialized or initialized to a
510+
/// When calling the `initializeMemory(as:from:)` method on a buffer `b`,
511+
/// the memory referenced by `b` must be uninitialized or initialized to a
512512
/// trivial type, and must be properly aligned for accessing `S.Element`.
513513
/// The buffer must contain sufficient memory to accommodate
514514
/// `source.underestimatedCount`.

0 commit comments

Comments
 (0)