utility

package
v0.0.0-...-b88a432 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdjustLength

func AdjustLength(s string, n int) string

AdjustLength shortens a string if it's word count is greater than n

func AdjustWhitespace

func AdjustWhitespace(s string) (string, error)

AdjustWhitespace replaces every group of whitespace characters with a single space charracter

func MinWordLength

func MinWordLength(s string, l int) (string, error)

Remove words of minimum length

func RandomWords

func RandomWords(n int) string

RandomWords generates a strings with the specified number of random words using wordlist

func ReadFile

func ReadFile(path string) (string, error)

ReadFile returns the file contents as a string

func RemoveNonAlpha

func RemoveNonAlpha(s string) (string, error)

RemoveNonAlpha removes all non-alphanumeric characters exept whitespace

Types

This section is empty.

Jump to

Keyboard shortcuts

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