strs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DedupeSlice

func DedupeSlice(s []string, modifier func(string) string) []string

DedupeSlice returns s with no duplicates, in the same order. If modifier is not nil, modifier will be applied to each element in s.

func DedupeSortSlice

func DedupeSortSlice(s []string, modifier func(string) string) []string

DedupeSortSlice returns s with no duplicates, sorted. If modifier is not nil, modifier will be applied to each element in s.

func IntersectionSlice

func IntersectionSlice(one []string, two []string) []string

IntersectionSlice return the intersection between one and two, sorted.

func IsCamelCase

func IsCamelCase(s string, extraRunes ...rune) bool

IsCamelCase returns false if s is empty or contains any character that is not between 'A' and 'Z' or 'a' and 'z'. It does not care about lowercase or uppercase.

func IsCapitalized

func IsCapitalized(s string) bool

IsCapitalized returns true if is is not empty and the first letter is between 'A' and 'Z'.

func IsLowerSnakeCase

func IsLowerSnakeCase(s string, extraRunes ...rune) bool

IsLowerSnakeCase returns false if s is empty or contains any character that is not between 'a' and 'z' or '0' and '9' or '_', or if s begins or ends with '_'.

func IsLowercase

func IsLowercase(s string) bool

IsLowercase returns true if s is not empty and is all lowercase.

func IsUpperSnakeCase

func IsUpperSnakeCase(s string, extraRunes ...rune) bool

IsUpperSnakeCase returns false if s is empty or contains any character that is not between 'A' and 'Z' or '0' and '9' or '_', or if s begins or ends with '_'.

func IsUppercase

func IsUppercase(s string) bool

IsUppercase returns true if s is not empty and is all uppercase.

func ToSnakeCase

func ToSnakeCase(s string) string

ToSnakeCase converts s to Snake_case. It is assumed s has no spaces.

func ToUpperSnakeCase

func ToUpperSnakeCase(s string) string

ToUpperSnakeCase converts s to UPPER_SNAKE_CASE.

Types

This section is empty.

Jump to

Keyboard shortcuts

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