Skip to content

proposal: strings: add ReplaceBetween function #45003

@pjebs

Description

@pjebs

ReplaceBetween(s, start, end, replace string, n int) string

ReplaceBetween will find all (non-overlapping) substrings beginning with start (token) and ending with end and replace all characters in-between (inclusive of start and end) with replace string.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions