File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ extension String.Index {
145
145
146
146
/// Creates a new index at the specified Unicode scalar offset
147
147
///
148
- /// - Parameter offset: An offset in UTF-8 code units.
148
+ /// - Parameter offset: An offset in terms of Unicode scalar values
149
149
public init ( offset: Int , within scalars: String . UnicodeScalarView ) {
150
150
let ( start, end) = ( scalars. startIndex, scalars. endIndex)
151
151
guard offset >= 0 ,
@@ -159,7 +159,7 @@ extension String.Index {
159
159
160
160
/// Creates a new index at the specified Character offset
161
161
///
162
- /// - Parameter offset: An offset in UTF-8 code units.
162
+ /// - Parameter offset: An offset in terms of Characters
163
163
public init ( offset: Int , within str: String ) {
164
164
let ( start, end) = ( str. startIndex, str. endIndex)
165
165
guard offset >= 0 ,
You can’t perform that action at this time.
0 commit comments