strutil

package
v1.6.17 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package strutil is the common sin of every Go programmer. It contains utility functions around strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstLower

func FirstLower(s string) string

FirstLower returns a copy of s, where the first rune is guaranteed to be a lowercase letter, like unicode.ToLower suggests.

func FirstUpper

func FirstUpper(s string) string

FirstUpper returns a copy of s, where the first rune is guaranteed to be an uppercase letter, like unicode.ToUpper suggests.

func RandomString

func RandomString(n uint) (string, error)

RandomString generates a random string with len n using the crypto/rand RNG. The returned string contains only chars defined in the randStrChars constant.

Types

This section is empty.

Jump to

Keyboard shortcuts

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