Skip to content

proposal: strings: add ReplaceBetween function #45003

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions