replacer

package
v0.0.0-...-267de36 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(name string) bool

TODO move to other package

func ExtractDirective

func ExtractDirective(data string, reqName string) (estData, settingsName, settingsValue string, ok bool)

reqName may be empty

func ExtractLine

func ExtractLine(s string) (line, est string)

TODO move to other package

func GetBlockData

func GetBlockData(data string) (estData string, blockData string)

func GetLine

func GetLine(s string) string

TODO move to other package

func IndexMulti

func IndexMulti(s string, seps []string) (i int, sep int)

TODO move to other package Index returns the index of the first instance of any seps in s and founded sep (its index in seps), or (-1,-1) if seps are not present in s.

func IsOverwriteSafe

func IsOverwriteSafe(fn string) bool

func Produce

func Produce(fn string)

func ProduceStr

func ProduceStr(data string) string

func ReplaceMulti

func ReplaceMulti(s string, old, new []string) (r string)

TODO move to other package Replace returns a copy of the string s with non-overlapping instances of old elements replaced by corresponding new elements. If len(old) != len(new) => panic if len(old[i])==0 => panic If old is empty, Replace return s as-is.

func SplitExt

func SplitExt(path string) (base, ext string)

TODO move to other package

func SplitToBlocks

func SplitToBlocks(data string) []block

Types

This section is empty.

Jump to

Keyboard shortcuts

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