base

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2015 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package base provides a function for converting base 10 numbers into other bases.

Index

Constants

This section is empty.

Variables

View Source
var DefaultCharacters = []string{
	"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e",
	"f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
	"u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I",
	"J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X",
	"Y", "Z",
}

DefaultCharacters contains 62 characters that can be safely used in filenames in all common filesystems.

Functions

func Convert

func Convert(number uint64, characters []string) (string, error)

Convert converts a base 10 number into another base. The target base is determined by the length of the characters slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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