string

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count added in v0.0.13

func Count(s string, c byte) int

Count 查询字符串中出现某个字符的次数

func CutEndString added in v0.0.17

func CutEndString(s string, c rune) string

CutEndString 截取字符串中最后一个字符之后的字符串 例如:CutEndString("abc/def/ghi", '/') => "ghi"

func CutStartString added in v0.0.17

func CutStartString(s string, c rune) string

CutStartString 截取字符串中最后一个字符之前的字符串 例如:CutStartString("abc/def/ghi", '/') => "abc/def/"

func FirstUp added in v0.0.18

func FirstUp(s string) string

FirstUp 首字母大写

func Has

func Has(s string, c byte) bool

Has 判断字符串是否存在某个字符

func IsPrefix

func IsPrefix(s string, prefix string) bool

IsPrefix 判断字符串是否存在某个前缀

func IsSuffix

func IsSuffix(s string, suffix string) bool

IsSuffix 判断字符串是否存在某个后缀

func ReplaceCharAfterSpecifiedCharLow added in v0.0.18

func ReplaceCharAfterSpecifiedCharLow(s, c string) (out string)

ReplaceCharAfterSpecifiedCharLow 替换指定字符后面的字符为小驼峰 例如:ReplaceCharAfterSpecifiedCharLow("abc/def/ghi", '/') => "abcDefGhi"

func ReplaceCharAfterSpecifiedCharUp added in v0.0.18

func ReplaceCharAfterSpecifiedCharUp(s, c string) (out string)

ReplaceCharAfterSpecifiedCharUp 替换指定字符后面的字符为大驼峰 例如:ReplaceCharAfterSpecifiedCharUp("abc/def/ghi", '/') => "AbcDefGhi"

Types

This section is empty.

Jump to

Keyboard shortcuts

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