textutil

package
v1.9.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnythingToString

func AnythingToString(v interface{}) string

将任意内容转换为字符串

func IsDigit

func IsDigit(ch rune) bool

是否为数字

func IsLetter

func IsLetter(ch rune) bool

是否为字母

func IsLowerLetter

func IsLowerLetter(ch rune) bool

是否为小写字母

func IsSpace

func IsSpace(ch rune) bool

是否为空格

func IsUpperLetter

func IsUpperLetter(ch rune) bool

是否为大写字母

func IsWhitesapce

func IsWhitesapce(ch rune) bool

是否为空白字符

func StartsWith

func StartsWith(s string, substr string) bool

是否以指定字符串开头

func TryParseBool added in v1.8.0

func TryParseBool(s string, defaultValue bool) bool

尝试解析bool,如果失败则返回默认值

func TryParseFloat32 added in v1.8.0

func TryParseFloat32(s string, defaultValue float32) float32

尝试解析float32,如果失败则返回默认值

func TryParseFloat64 added in v1.8.0

func TryParseFloat64(s string, defaultValue float64) float64

尝试解析float64,如果失败则返回默认值

func TryParseInt added in v1.8.0

func TryParseInt(s string, defaultValue int) int

尝试解析int,如果失败则返回默认值

func TryParseInt64 added in v1.8.0

func TryParseInt64(s string, defaultValue int64) int64

尝试解析int64,如果失败则返回默认值

func TryParseUint added in v1.8.0

func TryParseUint(s string, defaultValue uint) uint

尝试解析uint,如果失败则返回默认值

func TryParseUint64 added in v1.8.0

func TryParseUint64(s string, defaultValue uint64) uint64

尝试解析uint64,如果失败则返回默认值

Types

This section is empty.

Jump to

Keyboard shortcuts

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