utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountWords

func CountWords(s string) int

CountWords in a string

func GenerateHash

func GenerateHash() string

GenerateShortURL generates a short url

func RandomChars

func RandomChars(length int) string

RandomChars generates a random string of length n URL with length 5, will give 62⁵ = ~916 Million URLs URL with length 6, will give 62⁶ = ~56 Billion URLs URL with length 7, will give 62⁷ = ~3500 Billion URLs

func TimeRequiredToRead

func TimeRequiredToRead(s string) int

TimeRequiredToRead returns the time required to read a string

func TimeRequiredToRead(s string) float64 {
	return float64(len(s)) / 1000
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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