Files
Pulse/Sources/PulseUI/Extensions/NSAttributedString+Extensions.swift
2026-04-19 14:15:46 -04:00

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))
}
}