strings

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s, substr string) bool

Contains reports whether substr is within s. @function

func Format

func Format(format string, values ...interface{}) string

Format formats according to a format specifier and returns the resulting string. @function

func HasPrefix

func HasPrefix(s string, prefix string) bool

HasPrefix tests whether the string s begins with prefix. @function

func HasSuffix

func HasSuffix(s, suffix string) bool

HasSuffix tests whether the string s ends with suffix. @function

func Join

func Join(a []string, sep string) string

Join concatenates the elements of a to create a single string. The separator string sep is placed between elements in the resulting string. @function

func Lower

func Lower(s string) string

Lower returns a copy of the string s with all Unicode letters mapped to their lower case. @function

func Replace

func Replace(s, old, new string) string

Replace returns a copy of the string s with all non-overlapping instances of old replaced by new. @function

func Split

func Split(s string, sep string) []interface{}

Split slices s into all substrings separated by sep and returns a slice of the substrings between those separators.

If s does not contain sep and sep is not empty, Split returns a slice of length 1 whose only element is s.

If sep is empty, Split splits after each UTF-8 sequence. If both s and sep are empty, Split returns an empty slice. @function

func Title

func Title(s string) string

Title returns a copy of the string s with all Unicode letters that begin words mapped to their title case. @function

func TrimPrefix

func TrimPrefix(s string, prefix string) string

TrimPrefix returns s without the provided leading prefix string. If s doesn't start with prefix, s is returned unchanged. @function

func TrimSpace

func TrimSpace(s string) string

TrimSpace returns a slice of the string s, with all leading and trailing white space removed, as defined by Unicode. @function

func TrimSuffix

func TrimSuffix(s, suffix string) string

TrimSuffix returns s without the provided trailing suffix string. If s doesn't end with suffix, s is returned unchanged. @function

func Upper

func Upper(s string) string

Upper returns a copy of the string s with all Unicode letters mapped to their upper case. @function

Types

type ContainsInterpreter

type ContainsInterpreter struct {
}

ContainsInterpreter is the Conflow interpreter for the Contains function

func (ContainsInterpreter) Eval

func (i ContainsInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (ContainsInterpreter) Schema

func (i ContainsInterpreter) Schema() schema.Schema

type FormatInterpreter

type FormatInterpreter struct {
}

FormatInterpreter is the Conflow interpreter for the Format function

func (FormatInterpreter) Eval

func (i FormatInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (FormatInterpreter) Schema

func (i FormatInterpreter) Schema() schema.Schema

type HasPrefixInterpreter

type HasPrefixInterpreter struct {
}

HasPrefixInterpreter is the Conflow interpreter for the HasPrefix function

func (HasPrefixInterpreter) Eval

func (i HasPrefixInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (HasPrefixInterpreter) Schema

func (i HasPrefixInterpreter) Schema() schema.Schema

type HasSuffixInterpreter

type HasSuffixInterpreter struct {
}

HasSuffixInterpreter is the Conflow interpreter for the HasSuffix function

func (HasSuffixInterpreter) Eval

func (i HasSuffixInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (HasSuffixInterpreter) Schema

func (i HasSuffixInterpreter) Schema() schema.Schema

type JoinInterpreter

type JoinInterpreter struct {
}

JoinInterpreter is the Conflow interpreter for the Join function

func (JoinInterpreter) Eval

func (i JoinInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (JoinInterpreter) Schema

func (i JoinInterpreter) Schema() schema.Schema

type LowerInterpreter

type LowerInterpreter struct {
}

LowerInterpreter is the Conflow interpreter for the Lower function

func (LowerInterpreter) Eval

func (i LowerInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (LowerInterpreter) Schema

func (i LowerInterpreter) Schema() schema.Schema

type ReplaceInterpreter

type ReplaceInterpreter struct {
}

ReplaceInterpreter is the Conflow interpreter for the Replace function

func (ReplaceInterpreter) Eval

func (i ReplaceInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (ReplaceInterpreter) Schema

func (i ReplaceInterpreter) Schema() schema.Schema

type SplitInterpreter

type SplitInterpreter struct {
}

SplitInterpreter is the Conflow interpreter for the Split function

func (SplitInterpreter) Eval

func (i SplitInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (SplitInterpreter) Schema

func (i SplitInterpreter) Schema() schema.Schema

type TitleInterpreter

type TitleInterpreter struct {
}

TitleInterpreter is the Conflow interpreter for the Title function

func (TitleInterpreter) Eval

func (i TitleInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (TitleInterpreter) Schema

func (i TitleInterpreter) Schema() schema.Schema

type TrimPrefixInterpreter

type TrimPrefixInterpreter struct {
}

TrimPrefixInterpreter is the Conflow interpreter for the TrimPrefix function

func (TrimPrefixInterpreter) Eval

func (i TrimPrefixInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (TrimPrefixInterpreter) Schema

func (i TrimPrefixInterpreter) Schema() schema.Schema

type TrimSpaceInterpreter

type TrimSpaceInterpreter struct {
}

TrimSpaceInterpreter is the Conflow interpreter for the TrimSpace function

func (TrimSpaceInterpreter) Eval

func (i TrimSpaceInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (TrimSpaceInterpreter) Schema

func (i TrimSpaceInterpreter) Schema() schema.Schema

type TrimSuffixInterpreter

type TrimSuffixInterpreter struct {
}

TrimSuffixInterpreter is the Conflow interpreter for the TrimSuffix function

func (TrimSuffixInterpreter) Eval

func (i TrimSuffixInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (TrimSuffixInterpreter) Schema

func (i TrimSuffixInterpreter) Schema() schema.Schema

type UpperInterpreter

type UpperInterpreter struct {
}

UpperInterpreter is the Conflow interpreter for the Upper function

func (UpperInterpreter) Eval

func (i UpperInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (UpperInterpreter) Schema

func (i UpperInterpreter) Schema() schema.Schema

Jump to

Keyboard shortcuts

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