util

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OldCharset = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"
	Charset    = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
)

Variables

This section is empty.

Functions

func CheckCharacterSet

func CheckCharacterSet(a *c4.ID, b *c4.ID) (*c4.ID, error)

CheckCharacterSet, given the same underlying C4 ID encoded in the old and new character sets, will return the version that is correctly encoded. A nil ID and an error are returned if either ID is invalid or the two ids are not an encoding of the same ID.

func NewCharsetIDToOld

func NewCharsetIDToOld(id *c4.ID) *c4.ID

NewCharsetIDToOld transforms IDs from the correct, current character set to the old character set. This is not very useful outside of testing, so be sure you know what you're doing before using this function.

func OldCharsetIDToNew

func OldCharsetIDToNew(id *c4.ID) *c4.ID

OldCharsetIDToNew transforms IDs from the incorrect (old) character set to the correct, and current one.

Be careful! This function cannot detect wither an ID uses the correct character set or not so care must be taken not to apply this function to IDs that are correct.

Types

This section is empty.

Jump to

Keyboard shortcuts

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