format

package
v1.50.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Secret

func Secret(nToShow int, secret string) string

func SpaceUpperCase added in v0.42.0

func SpaceUpperCase(s string) string

SpaceUpperCase add a space each occurrence of an upper case letter.

res := format.SpaceUpperCase("myExampleString") -> my Example String

func Truncate added in v0.42.0

func Truncate(s string, max int) string

Truncate reduce a string to specified char limit. Append ellipsis.

res := format.Truncate("myExampleString", 10)

-> myExampleS...

Types

This section is empty.

Jump to

Keyboard shortcuts

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