split

package
v0.0.0-...-a510a1c Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blocks

func Blocks(s string) ([]string, error)

Split into blocks, separated by empty lines.

func Bytes

func Bytes(s string) ([]string, error)

Split into bytes.

func Fields

func Fields(s string) ([]string, error)

Split into whitespace-separated fields.

func Lines

func Lines(s string) ([]string, error)

Split into lines.

Types

type Func

type Func func(string) ([]string, error)

func Any

func Any(sep ...string) Func

Split along any of a set of separators. If multiple separators overlap, the first match is used.

func On

func On(sep string) Func

Split along sep.

func Regexp

func Regexp(re string) Func

Split into capture groups of a regular expression. The regular expression must match the full parsed string.

func SplitN

func SplitN(sep string, n int) Func

Split into at most n pieces, along sep.

Jump to

Keyboard shortcuts

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