mirror of
https://github.com/kean/Pulse.git
synced 2026-05-30 21:07:33 +00:00
16 lines
500 B
Swift
16 lines
500 B
Swift
// The MIT License (MIT)
|
|
//
|
|
// Copyright (c) 2020-2026 Alexander Grebenyuk (github.com/kean).
|
|
|
|
import Foundation
|
|
|
|
extension NSMutableAttributedString {
|
|
package func append(_ string: String, _ attributes: [NSAttributedString.Key: Any] = [:]) {
|
|
append(NSAttributedString(string: string, attributes: attributes))
|
|
}
|
|
|
|
package func addAttributes(_ attributes: [NSAttributedString.Key: Any]) {
|
|
addAttributes(attributes, range: NSRange(location: 0, length: string.count))
|
|
}
|
|
}
|