strs

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultIfBlank

func DefaultIfBlank(str, def string) string

func Equals

func Equals(a, b string) bool

func EqualsIgnoreCase

func EqualsIgnoreCase(a, b string) bool

func IsAnyBlank

func IsAnyBlank(strs ...string) bool

func IsBlank

func IsBlank(str string) bool

IsBlank checks if a string is whitespace or empty (""). Observe the following behavior:

goutils.IsBlank("")        = true
goutils.IsBlank(" ")       = true
goutils.IsBlank("bob")     = false
goutils.IsBlank("  bob  ") = false

Parameter:

str - the string to check

Returns:

true - if the string is whitespace or empty ("")

func IsEmpty

func IsEmpty(str string) bool

IsEmpty checks if a string is empty (""). Returns true if empty, and false otherwise.

func IsNotBlank

func IsNotBlank(str string) bool

func IsNotEmpty

func IsNotEmpty(str string) bool

func RuneLen

func RuneLen(s string) int

RuneLen 字符成长度

func Substr

func Substr(s string, start, length int) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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