commons

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelToSnake

func CamelToSnake(s string) string

CamelToSnake converts a given string to snake case

func CamelToSnakeLow

func CamelToSnakeLow(s string) string

CamelToSnake converts a given string to snake case

func NormalizeName

func NormalizeName(name string) string

func NormalizeNameAndUpper

func NormalizeNameAndUpper(name string) string

func NormalizeUpperValue

func NormalizeUpperValue(v string) string

func NormalizeValue

func NormalizeValue(v string) string

func ReadWords

func ReadWords(p []byte) (words []string)

func SnakeToCamel

func SnakeToCamel(s string) string

SnakeToCamel returns a string converted from snake case to uppercase

func SnakeToCamelLower

func SnakeToCamelLower(s string) string

SnakeToCamelLower returns a string converted from snake case to lowercase

func SplitFullName

func SplitFullName(fullName string) (name1 string, name2 string)

func WordsContainsAll

func WordsContainsAll(words []string, sub ...string) (has bool)

func WordsContainsOne

func WordsContainsOne(words []string, sub ...string) (has bool)

func WordsIndex

func WordsIndex(words []string, word string) (idx int)

func WordsToLine

func WordsToLine(words []string) (line string)

Types

type Lines

type Lines struct {
	// contains filtered or unexported fields
}

func NewLines

func NewLines(content string) *Lines

func (*Lines) CurrentLineWords

func (lines *Lines) CurrentLineWords() []string

func (*Lines) HasNext

func (lines *Lines) HasNext() bool

func (*Lines) NextLine

func (lines *Lines) NextLine() string

func (*Lines) Prev

func (lines *Lines) Prev()

func (*Lines) Remain

func (lines *Lines) Remain() string

func (*Lines) Reset

func (lines *Lines) Reset()

Jump to

Keyboard shortcuts

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