Skip to content

(API) Add method Help.Ansi.Text::concat and deprecate the append method #343

@remkop

Description

@remkop

Principle of least surprise: this method looks very similar to StringBuilder.append but behaves differently if it does not modify but returns a modified copy.

I experimented with making Text mutable, and let Help.Ansi.Text::append modify the specified Text instance instead of returning a new Text instance. This works with some changes, but I was not happy with the inconsistency that the substring method returns a copy while append modifies the receiver.

Changing the method name to resemble the corresponding functionality in the String class is a better solution.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions