Add isIdentical to StringGuts and use it for comparation

This commit is contained in:
WindowsMEMZ
2025-10-30 10:00:39 +08:00
committed by Rick van Voorden
parent 14e37a15ec
commit 288a69842d
4 changed files with 10 additions and 3 deletions

View File

@@ -535,6 +535,6 @@ extension String.UnicodeScalarView {
/// - Complexity: O(1)
@available(SwiftStdlib 6.3, *)
public func isTriviallyIdentical(to other: Self) -> Bool {
self._guts.rawBits == other._guts.rawBits
self._guts.isTriviallyIdentical(to: other._guts)
}
}