strutil

package
v0.2.53 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FNM_NOESCAPE = (1 << iota)
	FNM_PATHNAME
	FNM_PERIOD

	FNM_LEADING_DIR
	FNM_CASEFOLD

	FNM_IGNORECASE = FNM_CASEFOLD
	FNM_FILE_NAME  = FNM_PATHNAME
)

Variables

This section is empty.

Functions

func Contains

func Contains(ss []string, str string) bool

Contains determines whether the str is in the strs.

func Diff

func Diff(base, exclude []string) (result []string)

Diff Creates an slice of slice values not included in the other given slice.

func Filter

func Filter(ss []string, str string) (dt []string)

func Find

func Find(ss []string, str string) int

func Match

func Match(pattern, s string, flags int) bool

Matches the pattern against the string, with the given flags, and returns true if the match is successful. This function should match fnmatch.3 as closely as possible.

func Remove

func Remove(ss []string, s string) (result []string)

Remove remove item from slice

func Reverse

func Reverse(s string) string

Reverse returns its argument string reversed rune-wise left to right.

func SubStr

func SubStr(s string, start, length int) string

SubStr 截取字符串

func ToBytes

func ToBytes(str string) []byte

ToBytes converts the specified str to a byte array.

func ToFloat64

func ToFloat64(s string) (float64, error)

func ToInt

func ToInt(s string) (int, error)

func ToInt64

func ToInt64(str string) (int64, error)

func ToStr

func ToStr(bytes []byte) string

ToStr converts the specified byte array to a string.

func Unique

func Unique(ss []string) (result []string)

Unique

Types

This section is empty.

Jump to

Keyboard shortcuts

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