strutil

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSequence added in v1.0.12

func CheckSequence(output string, sequence []string) error

func IndentLines added in v1.0.38

func IndentLines(content string, prefix string) string

func IndexSequence

func IndexSequence(s string, sequence []string) int

func IndexSequenceAt added in v1.0.2

func IndexSequenceAt(s string, sequence []string, begin bool) int

func SequenceOffset added in v1.0.19

func SequenceOffset(s string, sequence []string, i int, begin bool) (anchorOffset int, anchorLen int, endOffset int)

- `anchorOffset` is the offset of the `i`'s anchor, if `begin` is false, it adds the length of the anchor - `anchorLen` is the length of the `i`'s anchor - `endOffset` is the end offset, which is the last anchor's starting offset plus its length

func ToReadonlyBytes added in v1.1.0

func ToReadonlyBytes(s string) []byte

func ToReadonlyString added in v1.1.0

func ToReadonlyString(bytes []byte) string

func TrimBefore added in v1.0.32

func TrimBefore(s string, p string) (string, bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL