strings

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Choose added in v0.7.0

func Choose(cond bool, trueVal, falseVal string) string

Choose is like the ternary operator ?. It returns the first string on true, and the second on false.

func EndsWith

func EndsWith(s string, ending string) bool

EndsWith returns true if the string ends with the ending string.

func ExtractNumbers added in v0.7.1

func ExtractNumbers(in string) (out string)

func HasOnlyLetters added in v0.7.0

func HasOnlyLetters(s string) bool

HasOnlyLetters will return false if any of the characters in the string do not pass the unicode.IsLetter test.

func Indent added in v0.2.0

func Indent(s string) string

Indent will indent very line of the string with a tab

func JoinContent added in v0.7.0

func JoinContent(sep string, items ...string) string

JoinContent joins strings together with the separator sep. Only strings that are not empty strings are joined.

func KebabToCamel added in v0.2.4

func KebabToCamel(s string) string

func LcFirst

func LcFirst(s string) string

LcFirst makes sure the first character in the string is lower case.

func StartsWith

func StartsWith(s string, beginning string) bool

StartsWith returns true if the string begins with the beginning string.

func Title added in v0.2.0

func Title(s string) string

Title is a more advanced titling operation, that will convert underscores to spaces, and add spaces to CamelCase words

Types

This section is empty.

Jump to

Keyboard shortcuts

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