mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
UnicodeScalar => Unicode.Scalar
This commit is contained in:
@@ -451,13 +451,13 @@ extension String.CharacterView : BidirectionalCollection {
|
||||
// pass.
|
||||
if relativeOffset >= asciiBuffer.startIndex &&
|
||||
relativeOffset < asciiBuffer.endIndex {
|
||||
return Character(UnicodeScalar(asciiBuffer[relativeOffset]))
|
||||
return Character(Unicode.Scalar(asciiBuffer[relativeOffset]))
|
||||
}
|
||||
} else if _core._baseAddress != nil {
|
||||
let cu = _core._nthContiguous(relativeOffset)
|
||||
// Only constructible if sub-surrogate
|
||||
if (cu < 0xd800) {
|
||||
return Character(UnicodeScalar(cu)._unsafelyUnwrappedUnchecked)
|
||||
return Character(Unicode.Scalar(cu)._unsafelyUnwrappedUnchecked)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user