Skip to content

Commit b596724

Browse files
committed
SQUASH ME: documentation fix
1 parent 0cff8fb commit b596724

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/core/StringIndex.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ extension String.Index {
145145

146146
/// Creates a new index at the specified Unicode scalar offset
147147
///
148-
/// - Parameter offset: An offset in UTF-8 code units.
148+
/// - Parameter offset: An offset in terms of Unicode scalar values
149149
public init(offset: Int, within scalars: String.UnicodeScalarView) {
150150
let (start, end) = (scalars.startIndex, scalars.endIndex)
151151
guard offset >= 0,
@@ -159,7 +159,7 @@ extension String.Index {
159159

160160
/// Creates a new index at the specified Character offset
161161
///
162-
/// - Parameter offset: An offset in UTF-8 code units.
162+
/// - Parameter offset: An offset in terms of Characters
163163
public init(offset: Int, within str: String) {
164164
let (start, end) = (str.startIndex, str.endIndex)
165165
guard offset >= 0,

0 commit comments

Comments
 (0)