@@ -17,7 +17,7 @@ extension UTF8Span {
1717 ///
1818 /// `i` must be scalar-aligned.
1919 internal func _previousScalarStart( _ i: Int ) -> Int {
20- precondition ( _boundsCheck ( i&- 1 ) )
20+ _precondition ( _boundsCheck ( i&- 1 ) )
2121 return _previousScalarStart ( unchecked: i)
2222 }
2323
@@ -31,7 +31,7 @@ extension UTF8Span {
3131 /// this is an unsafe operation.
3232 internal func _previousScalarStart( unchecked i: Int ) -> Int {
3333 _internalInvariant ( _boundsCheck ( i&- 1 ) )
34- precondition ( _isScalarAligned ( unchecked: i) )
34+ _precondition ( _isScalarAligned ( unchecked: i) )
3535 return _previousScalarStart ( uncheckedAssumingAligned: i)
3636 }
3737
@@ -81,7 +81,7 @@ extension UTF8Span {
8181 internal func _decodePreviousScalar(
8282 _ i: Int
8383 ) -> ( Unicode . Scalar , previousScalarStart: Int ) {
84- precondition ( _boundsCheck ( i &- 1 ) )
84+ _precondition ( _boundsCheck ( i &- 1 ) )
8585 return _decodePreviousScalar ( unchecked: i)
8686 }
8787
@@ -96,7 +96,7 @@ extension UTF8Span {
9696 unchecked i: Int
9797 ) -> ( Unicode . Scalar , previousScalarStart: Int ) {
9898 _internalInvariant ( _boundsCheck ( i &- 1 ) )
99- precondition ( _isScalarAligned ( unchecked: i) )
99+ _precondition ( _isScalarAligned ( unchecked: i) )
100100 return _decodePreviousScalar ( uncheckedAssumingAligned: i)
101101 }
102102
@@ -127,7 +127,7 @@ extension UTF8Span {
127127 internal func _scalarAlignBackwards( _ i: Int ) -> Int {
128128 if i == count || i == 0 { return i }
129129
130- precondition ( _boundsCheck ( i) )
130+ _precondition ( _boundsCheck ( i) )
131131 return unsafe _start( ) . _scalarAlign ( i)
132132 }
133133
@@ -169,7 +169,7 @@ extension UTF8Span {
169169 ///
170170 /// `i` must be `Character`-aligned.
171171 internal func _nextCharacterStart( _ i: Int ) -> Int {
172- precondition ( _boundsCheck ( i) )
172+ _precondition ( _boundsCheck ( i) )
173173 return _nextCharacterStart ( unchecked: i)
174174 }
175175
@@ -183,7 +183,7 @@ extension UTF8Span {
183183 /// this is an unsafe operation.
184184 internal func _nextCharacterStart( unchecked i: Int ) -> Int {
185185 _internalInvariant ( _boundsCheck ( i) )
186- precondition ( _isScalarAligned ( unchecked: i) )
186+ _precondition ( _isScalarAligned ( unchecked: i) )
187187 return _nextCharacterStart ( uncheckedAssumingAligned: i)
188188 }
189189
@@ -212,7 +212,7 @@ extension UTF8Span {
212212 ///
213213 /// `i` must be `Character`-aligned.
214214 internal func _previousCharacterStart( _ i: Int ) -> Int {
215- precondition ( _boundsCheck ( i&- 1 ) )
215+ _precondition ( _boundsCheck ( i&- 1 ) )
216216 return _previousCharacterStart ( unchecked: i)
217217 }
218218
@@ -226,7 +226,7 @@ extension UTF8Span {
226226 /// this is an unsafe operation.
227227 internal func _previousCharacterStart( unchecked i: Int ) -> Int {
228228 _internalInvariant ( _boundsCheck ( i&- 1 ) )
229- precondition ( _isScalarAligned ( unchecked: i) )
229+ _precondition ( _isScalarAligned ( unchecked: i) )
230230 return _previousCharacterStart ( uncheckedAssumingAligned: i)
231231 }
232232
@@ -256,7 +256,7 @@ extension UTF8Span {
256256 internal func _decodeNextCharacter(
257257 _ i: Int
258258 ) -> ( Character , nextCharacterStart: Int ) {
259- precondition ( _boundsCheck ( i) )
259+ _precondition ( _boundsCheck ( i) )
260260 return _decodeNextCharacter ( unchecked: i)
261261 }
262262
@@ -271,7 +271,7 @@ extension UTF8Span {
271271 unchecked i: Int
272272 ) -> ( Character , nextCharacterStart: Int ) {
273273 _internalInvariant ( _boundsCheck ( i) )
274- precondition ( _isScalarAligned ( unchecked: i) )
274+ _precondition ( _isScalarAligned ( unchecked: i) )
275275 return _decodeNextCharacter ( uncheckedAssumingAligned: i)
276276 }
277277
@@ -299,7 +299,7 @@ extension UTF8Span {
299299 ///
300300 /// `i` must be `Character`-aligned.
301301 internal func _decodePreviousCharacter( _ i: Int ) -> ( Character , Int ) {
302- precondition ( _boundsCheck ( i &- 1 ) )
302+ _precondition ( _boundsCheck ( i &- 1 ) )
303303 return _decodePreviousCharacter ( unchecked: i)
304304 }
305305
@@ -314,7 +314,7 @@ extension UTF8Span {
314314 unchecked i: Int
315315 ) -> ( Character , Int ) {
316316 _internalInvariant ( _boundsCheck ( i &- 1 ) )
317- precondition ( _isScalarAligned ( unchecked: i) )
317+ _precondition ( _isScalarAligned ( unchecked: i) )
318318 return _decodePreviousCharacter ( uncheckedAssumingAligned: i)
319319 }
320320
0 commit comments