text

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

type Matcher string

Matcher is an alias of a string that can contain specific variable instructsions to be replaced when calling the 'String' function. This alias provides the 'Match' function, which returns a Regexp struct that will match any value generated.

func (Matcher) Match

func (s Matcher) Match() Regexp

Match returns a valid Regexp struct that is guaranteed to match any string generated by the Matcher's 'String' function.

func (Matcher) MatchEx

func (s Matcher) MatchEx(o bool) Regexp

MatchEx returns a valid Regexp struct that is guaranteed to match any string generated by the Matcher's 'String' function. MatchEx returns an inverse matcher if the bool is false.

func (Matcher) Raw

func (s Matcher) Raw() string

Raw returns the raw string value of this Matcher without preforming any replacements.

func (Matcher) String

func (s Matcher) String() string

String parses this MatchString value and will preform any replacements and fill any variables contained.

func (Matcher) UnMatch

func (s Matcher) UnMatch() Regexp

UnMatch returns a valid Regexp struct that is guaranteed to not match any string generated by the Matcher's 'String' function.

type Regexp

type Regexp interface {
	String() string
	Match([]byte) bool
	MatchString(string) bool
}

Regexp is a compatibility interface that is used to allow for UnMatch values to be used lacking the ability of RE2 used in Golang to do negative lookahead.

type String

type String string

String is a wrapper for strings to support the Stringer interface.

func (String) String

func (s String) String() string

String returns the string value of itself.

Jump to

Keyboard shortcuts

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