Skip to content

Cut + CutPrefix + CutSuffix for slices #664

@samber

Description

@samber

Something similar to strings package.

func Cut[T any, S ~[]T](s S, sep T) (before S, after S, found bool)
func CutPrefix[T any, S ~[]T](s S, suffix T) (after S, found bool)
func CutSuffix[T any, S ~[]T](s S, suffix T) (before S, found bool)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions