shaper

package module
v0.0.0-...-33f0264 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2016 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PassThrough

func PassThrough(s string) string

func ShaperDemo

func ShaperDemo()

Types

type Shaper

type Shaper struct {
	ShaperStack func(string) string
}

func NewFilter

func NewFilter() *Shaper

Make a new Shaper filter and start adding bits

func (*Shaper) AddFilter

func (me *Shaper) AddFilter(f func(string) string) *Shaper

Use this to apply arbitrary filters

func (*Shaper) ApplyRegexpReplaceAll

func (me *Shaper) ApplyRegexpReplaceAll(rexp, repl string) *Shaper

func (*Shaper) ApplyReplace

func (me *Shaper) ApplyReplace(old, new string, times int) *Shaper

func (*Shaper) ApplyToLower

func (me *Shaper) ApplyToLower() *Shaper

func (*Shaper) ApplyToUpper

func (me *Shaper) ApplyToUpper() *Shaper

func (*Shaper) Copy

func (me *Shaper) Copy() *Shaper

Copy returns a copy of the original object, instead of editing in-place, so make sure you've already got a reference to the original This should NEVER be hung off of a NewFilter string, or the original NewFilter will be lost

func (*Shaper) Process

func (me *Shaper) Process(s string) string

Call this on the returned object to actually process a string

Jump to

Keyboard shortcuts

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