stringutil

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CutNumber

func CutNumber(s string) (num string, after string, found bool)

func IsDigit

func IsDigit(r rune) bool

func IsOnlyDigits

func IsOnlyDigits(s string) bool

func ParseHumanDuration

func ParseHumanDuration(ageString string) (time.Duration, bool)

ParseHumanDuration decodes HumanDuration from k8s.io/apimachinery/pkg/util/duration

func ParseRatio

func ParseRatio(s string) (left, right string, ok bool)

ParseRatio attempts to parse a ratio delimited by slash, such as "1/2".

func SplitAndTrimSpace

func SplitAndTrimSpace(s, sep string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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