base62

package
v0.81.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: BSD-3-Clause Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyString = fmt.Errorf("empty string")
	ErrInvalidChar = fmt.Errorf("invalid character")
	ErrOverflow    = fmt.Errorf("integer overflow")
)

Functions

func Decode

func Decode(encoded string) (uint32, error)

Decode decodes a base62 string to a uint32 value. Returns an error if the input string is empty, contains invalid characters, or would result in integer overflow.

func Encode

func Encode(n uint32) string

Encode encodes a uint32 value to a base62 string. The returned string will be between 1-6 characters long.

Types

This section is empty.

Jump to

Keyboard shortcuts

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