smn_str

package
v0.0.0-...-8887d1c Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 3 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalysisTwoSplit

func AnalysisTwoSplit(inp string, joinEnd, dropEnd CharReadEnd) (string, string)

func AnalysisTwoSplitTrim

func AnalysisTwoSplitTrim(inp string, joinEnd, dropEnd CharReadEnd) (string, string)

func CharLower

func CharLower(c rune) rune

func CharUpper

func CharUpper(c rune) rune

func DropLineComment

func DropLineComment(line string) string

func GetConstDefine

func GetConstDefine(name string) string

func GetPathSep

func GetPathSep() string

func InitialsUpper

func InitialsUpper(str string) string

let first letter upper. hello ->Hello

func IsChar

func IsChar(c rune) bool

func IsLowerChar

func IsLowerChar(c rune) bool

func IsUpperChar

func IsUpperChar(c rune) bool

func NotNullSpaceSplit

func NotNullSpaceSplit(inp string) []string

func PathFmt

func PathFmt(path string) string

func PkgUpper

func PkgUpper(pkg string) string

PkgUpper from and_bnana to AndBnana.

func ProtoUseDeal

func ProtoUseDeal(typ string) (isArray bool, nt string)

ProtoUseDeal drop `[]`, `*` and let int as int64(proto not have int).

func RepeatJoin

func RepeatJoin(word, seq string, num int) string

func ToInt

func ToInt(val string) int

Types

type CharReadEnd

type CharReadEnd func(c rune) bool
var CIdentifierDropEndCheck CharReadEnd = func(c rune) bool {
	if (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_') || (c >= '0' && c <= '9') {
		return false
	}
	return true
}
var CIdentifierJoinEndCheck CharReadEnd = func(c rune) bool {
	return false
}

Jump to

Keyboard shortcuts

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