We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 799fad3 commit 7bcc50fCopy full SHA for 7bcc50f
Sources/SwiftASCII/String.swift
@@ -46,7 +46,12 @@ extension StringProtocol {
46
/// will be substituted.
47
@available(OSX 10.11, iOS 9.0, *)
48
public var asciiStringLossy: ASCIIString {
49
- let transformed = applyingTransform(
+#if canImport(Darwin)
50
+ let this = self
51
+#else
52
+ let this = String(self) as NSString
53
+#endif
54
+ let transformed = this.applyingTransform(
55
StringTransform("Latin-ASCII"),
56
reverse: false
57
)
0 commit comments