@@ -218,8 +218,8 @@ extension _StringGuts {
218
218
}
219
219
220
220
internal mutating func remove( from lower: Index , to upper: Index ) {
221
- let lowerOffset = lower. encodedOffset
222
- let upperOffset = upper. encodedOffset
221
+ let lowerOffset = lower. _encodedOffset
222
+ let upperOffset = upper. _encodedOffset
223
223
_internalInvariant ( lower. transcodedOffset == 0 && upper. transcodedOffset == 0 )
224
224
_internalInvariant ( lowerOffset <= upperOffset && upperOffset <= self . count)
225
225
@@ -279,16 +279,16 @@ extension _StringGuts {
279
279
isASCII: Bool
280
280
) {
281
281
let neededCapacity =
282
- bounds. lowerBound. encodedOffset
283
- + codeUnits. count + ( self . count - bounds. upperBound. encodedOffset )
282
+ bounds. lowerBound. _encodedOffset
283
+ + codeUnits. count + ( self . count - bounds. upperBound. _encodedOffset )
284
284
reserveCapacity ( neededCapacity)
285
285
286
286
_internalInvariant ( bounds. lowerBound. transcodedOffset == 0 )
287
287
_internalInvariant ( bounds. upperBound. transcodedOffset == 0 )
288
288
289
289
_object. nativeStorage. replace (
290
- from: bounds. lowerBound. encodedOffset ,
291
- to: bounds. upperBound. encodedOffset ,
290
+ from: bounds. lowerBound. _encodedOffset ,
291
+ to: bounds. upperBound. _encodedOffset ,
292
292
with: codeUnits)
293
293
self = _StringGuts ( _object. nativeStorage)
294
294
}
@@ -300,16 +300,16 @@ extension _StringGuts {
300
300
let replCount = codeUnits. count
301
301
302
302
let neededCapacity =
303
- bounds. lowerBound. encodedOffset
304
- + replCount + ( self . count - bounds. upperBound. encodedOffset )
303
+ bounds. lowerBound. _encodedOffset
304
+ + replCount + ( self . count - bounds. upperBound. _encodedOffset )
305
305
reserveCapacity ( neededCapacity)
306
306
307
307
_internalInvariant ( bounds. lowerBound. transcodedOffset == 0 )
308
308
_internalInvariant ( bounds. upperBound. transcodedOffset == 0 )
309
309
310
310
_object. nativeStorage. replace (
311
- from: bounds. lowerBound. encodedOffset ,
312
- to: bounds. upperBound. encodedOffset ,
311
+ from: bounds. lowerBound. _encodedOffset ,
312
+ to: bounds. upperBound. _encodedOffset ,
313
313
with: codeUnits,
314
314
replacementCount: replCount)
315
315
self = _StringGuts ( _object. nativeStorage)
0 commit comments