vstr

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(a, b string) bool

Equal reports whether `a` and `b`, interpreted as UTF-8 strings, are equal under Unicode case-folding, case-insensitively.

func Repeat

func Repeat(input string, multiplier int) string

Repeat returns a new string consisting of multiplier copies of the string input.

func S

func S(format string, a ...interface{}) string

S shortcut for fmt.Sprintf

func StrLimit

func StrLimit(str string, length int, suffix ...string) string

StrLimit returns a portion of string `str` specified by `length` parameters, if the length of `str` is greater than `length`, then the `suffix` will be appended to the result string. considers parameter `str` as unicode string.

func SubStr

func SubStr(str string, start int, length ...int) (substr string)

SubStr returns a portion of string `str` specified by the `start` and `length` parameters. considers parameter `str` as unicode string. The parameter `length` is optional, it uses the length of `str` in default.

func Trim

func Trim(str string, characterMask ...string) string

Trim strips whitespace (or other characters) from the beginning and end of a string. The optional parameter `characterMask` specifies the additional stripped characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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