InitializerFoundationEssentials
init(_:attributes:)
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
Creates a new attributed string with the given
String value associated with the given attributes.init(_ string: String, attributes: AttributeContainer = .init())
Parameters
stringA string to add attributes to.
attributesAttributes to apply to
string.