characters
TypeScriptget characters(): SDKHandleSwift declarationvar characters: DiscontiguousSlice<AttributedString.CharacterView> { get }The characters of the discontiguous attributed string, as a view into the underlying string.
struct · iOS 26.0+ · SDK 27.1
@dynamicMemberLookup struct DiscontiguousAttributedSubstringA discontiguous portion of an attributed string.
get characters(): SDKHandleSwift declarationvar characters: DiscontiguousSlice<AttributedString.CharacterView> { get }The characters of the discontiguous attributed string, as a view into the underlying string.
get description(): stringSwift declarationvar description: String { get }A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.
setAttributes(attributes: AttributeContainer): voidSwift declarationmutating func setAttributes(_ attributes: AttributeContainer)Sets the attributed string's attributes to those in a specified attribute container. - Parameters: - attributes: The attribute container with the attributes to apply.
get unicodeScalars(): SDKHandleSwift declarationvar unicodeScalars: DiscontiguousSlice<AttributedString.UnicodeScalarView> { get }The Unicode scalars of the discontiguous attributed string, as a view into the underlying string.
mergeAttributes(attributes: AttributeContainer, mergePolicy?: AttributedString_AttributeMergePolicy): voidSwift declarationmutating func mergeAttributes(_ attributes: AttributeContainer, mergePolicy: AttributedString.AttributeMergePolicy = .keepNew)Merges the attributed string's attributes with those in a specified attribute container. - Parameters: - attributes: The attribute container with the attributes to merge. - mergePolicy: A policy to use when resolving conflicts between this string's attributes and those in `attributes`.
replaceAttributes(attributes: AttributeContainer, others: AttributeContainer): voidSwift declarationmutating func replaceAttributes(_ attributes: AttributeContainer, with others: AttributeContainer)Replaces the attributed string's attributes with those in a specified attribute container. - Parameters: - attributes: The existing attributes to replace. - others: The new attributes to apply.
get base(): AttributedStringSwift declarationvar base: AttributedString { get }The underlying attributed string that the discontiguous attributed substring derives from.
get runs(): AttributedString_RunsSwift declarationvar runs: AttributedString.Runs { get }The attributed runs of the discontiguous attributed string, as a view into the underlying string.
subscript(bounds: SDKHandle): DiscontiguousAttributedSubstringSwift declarationsubscript(bounds: RangeSet<AttributedString.Index>) -> DiscontiguousAttributedSubstring { get }Returns a discontiguous substring of this discontiguous attributed string using a set of ranges to indicate the discontiguous substring bounds. - Parameter bounds: A set of ranges that indicate the bounds of the discontiguous substring to return.
4 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
DiscontiguousAttributedSubstring.subscript(_:)
This parameter hides a concrete Swift type.
DiscontiguousAttributedSubstring.subscript(_:)
Passing a Swift type itself is not supported.
DiscontiguousAttributedSubstring.subscript(dynamicMember:)
This declaration needs Swift generic type arguments. (no canonical witness for K)
DiscontiguousAttributedSubstring.subscript(dynamicMember:)
Passing a Swift type itself is not supported.