xstrings

package
v0.0.0-...-7149754 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllOrSomeFilter

func AllOrSomeFilter(list, filterList []string) []string

AllOrSomeFilter filters elems out from the list as they present in filterList and returns the remaning ones. if filterList is empty, all elems from list returned.

func FormatUsername

func FormatUsername(s string) string

FormatUsername formats a username to make it usable as a variable

func List

func List(n int, do func(i int) string) []string

List returns a slice of strings captured after the value returned by do which is called n times.

func NoDash

func NoDash(s string) string

NoDash removes dash from the string

func NoNumberPrefix

func NoNumberPrefix(s string) string

NoNumberPrefix adds a underscore at the beginning of the string if it stars with a number this is used for package of proto files template because the package name can't start with a number.

func SliceContains

func SliceContains(ss []string, s string) bool

SliceContains returns with true if s is a member of ss.

func Title

func Title(title string) string

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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