text

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixedLength added in v1.7.3

func FixedLength(text string, length int) string

FixedLength expands or trims the given text to the provided length

func Plural added in v1.7.6

func Plural(amount int, text ...string) string

Plural returns a string with the number and noun in either singular or plural form. If one text argument is given, the plural will be done with the plural s. If two arguments are provided, the second text is the irregular plural. If more than two are provided, then the additional ones are simply ignored.

func RandomString

func RandomString(length int) string

RandomString creates a string with random content and a given length

func RandomStringWithPrefix

func RandomStringWithPrefix(prefix string, length int) string

RandomStringWithPrefix creates a string with the provided prefix and additional random content so that the whole string has the given length.

Types

This section is empty.

Jump to

Keyboard shortcuts

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