shortener

package module
v0.0.0-...-af1ccd6 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2016 License: MIT Imports: 1 Imported by: 0

README

shortener

shortener 就是一个简单的base62的converter

如何使用shortener

// 把数字转换为字符串
s := shortener.Encode(1)

// 把字符串转换为数字
n := shortener.Deocde(s)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shortener

type Shortener struct {
	// contains filtered or unexported fields
}

func NewShortener

func NewShortener(alphabet string) *Shortener

func (*Shortener) Decode

func (shorten *Shortener) Decode(s string) int64

func (*Shortener) Encode

func (shorten *Shortener) Encode(n int64) string

Jump to

Keyboard shortcuts

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