strlib

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomString

func GenerateRandomString() string

GenerateRandomString generate a random string with 32 byte length

func GenerateRandomStringWithLen

func GenerateRandomStringWithLen(length int) string

GenerateRandomStringWithLen generates a random string with length

func Title

func Title(s string) string

Title uppercase the first character, and lower case the rest, for example covert MANUAL to Manual

func TrimLineBreaks

func TrimLineBreaks(s string) string

TrimsLineBreaks trims line breaks in string.

func Truncate

func Truncate(str, suffix string, n int) string

Truncate tries to append the "suffix" to the "str". If the length of the appended string exceeds "n", the function truncates the "str" to make sure the "suffix" is appended

Types

This section is empty.

Jump to

Keyboard shortcuts

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