mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[String] In-register smol ASCII string compare
Compare small strings in-register when they store ASCII (and thus NFC) contents.
This commit is contained in:
@@ -90,6 +90,10 @@ extension _StringGuts {
|
||||
@inline(__always) get { return _object.isSmall }
|
||||
}
|
||||
|
||||
internal var isSmallASCII: Bool {
|
||||
@inline(__always) get { return _object.isSmall && _object.smallIsASCII }
|
||||
}
|
||||
|
||||
@inlinable
|
||||
internal var asSmall: _SmallString {
|
||||
@inline(__always) get { return _SmallString(_object) }
|
||||
|
||||
Reference in New Issue
Block a user