text

package
v0.1.78 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapFunc

func WrapFunc(fn func(string) string) func(string) (string, error)

Types

type Cut

type Cut struct {
	Sep string
}

func (Cut) Once

func (Cut) Once() bool

func (Cut) Process

func (p Cut) Process(s string) (string, error)

type Processor

type Processor interface {
	Once() bool
	Process(string) (string, error)
}

func NewProcessor

func NewProcessor(once bool, fn func(string) (string, error)) Processor

type RemoveByRegexp

type RemoveByRegexp struct {
	*regexp.Regexp
}

func (RemoveByRegexp) Once

func (RemoveByRegexp) Once() bool

func (RemoveByRegexp) Process

func (p RemoveByRegexp) Process(s string) (string, error)

type Tasks

type Tasks struct {
	// contains filtered or unexported fields
}

func NewTasks

func NewTasks(tasks ...Processor) *Tasks

func (*Tasks) Append

func (t *Tasks) Append(tasks ...Processor) *Tasks

func (*Tasks) CutSpace

func (t *Tasks) CutSpace() *Tasks

func (*Tasks) Process

func (t *Tasks) Process(s string) (string, error)

func (*Tasks) ProcessAll

func (t *Tasks) ProcessAll(s []string) ([]string, error)

func (*Tasks) RemoveParentheses

func (t *Tasks) RemoveParentheses() *Tasks

func (*Tasks) TrimSpace

func (t *Tasks) TrimSpace() *Tasks

type Trim

type Trim struct {
	Cutset string
}

func (Trim) Once

func (Trim) Once() bool

func (Trim) Process

func (p Trim) Process(s string) (string, error)

Jump to

Keyboard shortcuts

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