strs

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2019 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package strs contains common string manipulation functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLowerCase

func IsLowerCase(s string) bool

IsLowerCase returns true if s only contain characters in the range a-z0-9.

func IsLowerSnakeCase

func IsLowerSnakeCase(s string) bool

IsLowerSnakeCase returns true if s only contains lowercase letters, digits, and/or underscores. s MUST NOT begin or end with an underscore.

func IsUpperCamelCase

func IsUpperCamelCase(s string) bool

IsUpperCamelCase returns true if s is not empty and is camel case with an initial capital.

func IsUpperSnakeCase

func IsUpperSnakeCase(s string) bool

IsUpperSnakeCase returns true if s only contains uppercase letters, digits, and/or underscores. s MUST NOT begin or end with an underscore.

func SplitCamelCaseWord

func SplitCamelCaseWord(s string) []string

SplitCamelCaseWord splits a CamelCase word into its parts.

If s is empty, returns nil. If s is not CamelCase, returns nil.

func SplitSnakeCaseWord

func SplitSnakeCaseWord(s string) []string

SplitSnakeCaseWord splits a snake_case word into its parts.

If s is empty, returns nil. If s is not snake_case, returns nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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