strings

package
Version: v1.34.3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

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

Contains returns true, if the specified slice contains the specified element, false otherwise

func ConvertSlashes added in v1.15.0

func ConvertSlashes(input string) string

func EscapeSingleQuote

func EscapeSingleQuote(s string) string

func GetOnlyLetters added in v1.5.0

func GetOnlyLetters(yourString string) string

GetOnlyLetters returns a string containing only letters from given string

func GetOnlyNumbers added in v1.5.0

func GetOnlyNumbers(yourString string) string

GetOnlyNumbers returns a string containing only numbers from given string

func GetSignedNumbers added in v1.5.0

func GetSignedNumbers(yourString string) string

GetSignedNumbers returns a string containing only positive and negative numbers from given string

func HasLetters added in v1.5.0

func HasLetters(yourString string) bool

HasLetters returns true when string contains a letter [a-zA-Z]

func HasNumbers added in v1.5.0

func HasNumbers(yourString string) bool

HasNumbers returns true when string contains a letter [0-9]

func HasOnlyLetters added in v1.5.0

func HasOnlyLetters(yourString string) bool

HasOnlyLetters returns true when string contains only letters

func HasOnlyNumbers added in v1.5.0

func HasOnlyNumbers(yourString string) bool

HasOnlyNumbers returns true when string contains only numbers

func ParseLines added in v1.19.0

func ParseLines(stdout string) []string

func Remove added in v1.10.0

func Remove(slice []string, value string) []string

Remove takes a slice of strings and returns a slice with the first occurrence of the string value removed.

func SplitAndTrim added in v1.9.0

func SplitAndTrim(s string, separator string) ([]string, error)

SplitAndTrim split the string based on the separator passed

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL