Skip to content

🐞 Missing Function for Replacing Characters with Multiple Ranges and Strings #44

Closed as not planned
@tom-ludwig

Description

@tom-ludwig

Description

The current implementation lacks a function that accepts multiple ranges and corresponding strings for replacement. We need a method similar to the following:

public func replaceCharacters(in ranges: [[NSRange]], with strings: [String])

This function should allow replacing characters in multiple ranges with their respective strings.
While you can call replaceCharacters(_:with:) multiple times, each call is treated as a separate insertion, which creates a misleading undo history.

Example:

Comments:

Screen.Recording.2024-08-20.at.7.13.48.PM.mov

To Reproduce

x

Expected Behavior

x

Version Information

No response

Additional Context

No response

Screenshots

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

🏁 Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions