Instance Methodswift 6.0.3FoundationEssentials
replaceSubrange(_:with:)
- iOS
- 15+
- macOS
- 12+
- tvOS
- 15+
- watchOS
- 8+
mutating func replaceSubrange(_ subrange: Range<AttributedString.CharacterView.Index>, with newElements: some Collection<Character>)
mutating func replaceSubrange(_ subrange: Range<AttributedString.CharacterView.Index>, with newElements: some Collection<Character>)
s20FoundationEssentials16AttributedStringV13CharacterViewV15replaceSubrange_4withySnyAC5IndexVG_xtSlRzSJ7ElementRtzlF
What are these?3LUKT
import FoundationEssentials
struct CharacterView
@dynamicMemberLookup struct AttributedString
@frozen struct Range<Bound> where Bound : Comparable
A half-open interval from a lower bound up to, but not including, an upper bound.
typealias Index = AttributedString.Index
protocol Collection<Element> : Sequence
A sequence whose elements can be traversed multiple times, nondestructively, and accessed by an indexed subscript.
@frozen struct Character
A single extended grapheme cluster that approximates a user-perceived character.
init()
var count: Int { get }
var endIndex: AttributedString.Index { get }
var startIndex: AttributedString.Index { get }
subscript(index: AttributedString.Index) -> Character { get set }
subscript(bounds: Range<AttributedString.Index>) -> Slice<AttributedString.CharacterView> { get set }
func distance(from start: AttributedString.Index, to end: AttributedString.Index) -> Int
func index(_ i: AttributedString.Index, offsetBy distance: Int) -> AttributedString.Index
func index(_ i: AttributedString.Index, offsetBy distance: Int, limitedBy limit: AttributedString.Index) -> AttributedString.Index?
func index(after i: AttributedString.Index) -> AttributedString.Index
func index(before i: AttributedString.Index) -> AttributedString.Index
typealias Element = Character