mfstringutil

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: MIT Imports: 5 Imported by: 0

README

MFSTRINGUTIL

Simple string utilities. I wrote these as I was tired of typing the same code into my projects just to check if a string consists of all digits.

v1.0.0

func StringAllDigits(instr string, acceptperiod bool) bool

Determines whether a string is made up of all digits. Optionally specifying if it accepts a period character.

v1.1.0

func StringAllZeros(instr string, acceptperiod bool) bool

Determines whether a string is made up of all zeros. Optionally specifying if it accepts a period character.

v1.2.0

func FormatDuration(dtn time.Duration) string

Formats a duration with a slightly more pleasing (to me) format.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDuration added in v1.2.0

func FormatDuration(dtn time.Duration) string

func StringAllDigits

func StringAllDigits(instr string, acceptperiod bool) bool

func StringAllZeros added in v1.1.0

func StringAllZeros(instr string, acceptperiod bool) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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