mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[stdlib] Substring.UnicodeScalarView: Add _invariantCheck
This commit is contained in:
@@ -357,6 +357,7 @@ extension _StringGuts {
|
||||
/// index, but it is guaranteed to never incorrectly return false. If all
|
||||
/// loaded binaries were built in 5.7+, then this method is guaranteed to
|
||||
/// always return the correct value.
|
||||
@_alwaysEmitIntoClient
|
||||
internal func hasMatchingEncoding(_ i: String.Index) -> Bool {
|
||||
(isForeign && i._canBeUTF16) || (!isForeign && i._canBeUTF8)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user