str

package standard library
go1.14.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package str provides string manipulation utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(x []string, s string) bool

Contains reports whether x contains s.

func FoldDup

func FoldDup(list []string) (string, string)

FoldDup reports a pair of strings from the list that are equal according to strings.EqualFold. It returns "", "" if there are no such strings.

func GlobsMatchPath added in go1.13

func GlobsMatchPath(globs, target string) bool

GlobsMatchPath reports whether any path prefix of target matches one of the glob patterns (as defined by path.Match) in the comma-separated globs list. It ignores any empty or malformed patterns in the list.

func HasFilePathPrefix added in go1.10

func HasFilePathPrefix(s, prefix