kmgStrings

package
v0.0.0-...-05317bf Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstLetterToUpper

func FirstLetterToUpper(s string) string

仅对 UTF-8 有效

func IsAllAphphabet

func IsAllAphphabet(s string) bool

是否s里面全部都是英文字母(只有那26个,大小写均可) 空字符串也是true

func IsAllNum

func IsAllNum(s string) bool

是否s里面全部都是数值(只有那10个,0-9) 空字符串也是true

func IsInSlice

func IsInSlice(slice []string, s string) bool

func IsStartWith

func IsStartWith(s string, start string) bool

func LastTwoPartSplit

func LastTwoPartSplit(originS string, splitS string) (p1 string, p2 string, ok bool)

LastTwoPartSplit("github.com/bronze1man/kmg/kmgGoSource/testPackage.Demo",".") -> "github.com/bronze1man/kmg/kmgGoSource/testPackage","Demo",false LastTwoPartSplit("Demo",".") -> "","",true

func LineDataToSlice

func LineDataToSlice(lineData string) []string

func MapStringBoolToSortedSlice

func MapStringBoolToSortedSlice(m map[string]bool) []string

func SliceNoRepeatMerge

func SliceNoRepeatMerge(s1 []string, s2 []string) []string

func SubStr

func SubStr(s string, from int, to int) string

Types

type SliceExistChecker

type SliceExistChecker map[string]bool

里面的字符串有3种状态, 1. false 表示需要检查,但是还没有遇到 2. true 表示需要检查,并且遇到了 3. 查不到 表示不需要检查,是否遇到过无关紧要.

func NewSliceExistChecker

func NewSliceExistChecker(slice ...string) SliceExistChecker

新建一个数据是否存在的检查者

func (SliceExistChecker) Add

func (c SliceExistChecker) Add(s string) bool

向Checker中插入一个字符串,返回该字符串是否在最开始要检查的列表里面.

func (SliceExistChecker) Check

func (c SliceExistChecker) Check() (NotExist string)

Jump to

Keyboard shortcuts

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