mirror of
https://github.com/apple/swift-foundation.git
synced 2025-05-23 05:50:12 +08:00
(144239125) Re-add existing SPI for enumerating NSAttributedString.Key runs (#1162)
This commit is contained in:
parent
1dc45d374d
commit
74275a96e8
@ -781,6 +781,11 @@ extension AttributedString.Runs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@_spi(AttributedString)
|
||||||
|
public subscript(nsAttributedStringKeys keys: NSAttributedString.Key...) -> NSAttributesSlice {
|
||||||
|
self[nsAttributedStringKeys: keys]
|
||||||
|
}
|
||||||
|
|
||||||
@_spi(AttributedString)
|
@_spi(AttributedString)
|
||||||
public subscript(nsAttributedStringKeys keys: [NSAttributedString.Key]) -> NSAttributesSlice {
|
public subscript(nsAttributedStringKeys keys: [NSAttributedString.Key]) -> NSAttributesSlice {
|
||||||
return NSAttributesSlice(runs: self, names: keys.map { $0.rawValue })
|
return NSAttributesSlice(runs: self, names: keys.map { $0.rawValue })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user