Documentation ¶
Overview ¶
Package charset provides types for defining and using arbritary charsets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ASCIIUppercase = CharsetArray("ABCDEFGHIJKLMNOPQRSTUVWXYZ") ASCIILowercase = CharsetArray("abcdefghijklmnopqrstuvwxyz") ASCIINumeric = CharsetArray("0123456789") ASCIISpace = CharsetArray(" ") ASCIISymbol = CharsetArray("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~") ASCII = CharsetArray(string(ASCIIUppercase) + string(ASCIILowercase) + string(ASCIISpace) + string(ASCIINumeric) + string(ASCIISymbol)) // UnicodePassword is a charset taken from the recommended unicode characters to use in passwords https://msdn.microsoft.com/en-us/library/cc875839.aspx UnicodePassword = CharsetArray{} /* 594 elements not displayed */ // UnicodeEmoji is a charset taken from http://www.unicode.org/Public/UNIDATA/EmojiSources.txt UnicodeEmoji = CharsetArray{} /* 722 elements not displayed */ )
Charsets predefined for common usage.
Functions ¶
This section is empty.
Types ¶
type Charset ¶
type Charset interface { // At returns the character at the zero based index i. At(i int) rune // Length returns the number of characters within the charset. Length() int }
Charset is an interface that provides a set of characters.
type CharsetArray ¶
type CharsetArray []rune
CharsetArray is an array of characters.
func (CharsetArray) Length ¶
func (c CharsetArray) Length() int
Length returns the number of characters in the charset.
type CharsetRange ¶
CharsetRange is a contiguous range of characters starting at First and ending at and including Last.
func (CharsetRange) Length ¶
func (c CharsetRange) Length() int
Length returns the number of characters in the charset.
Click to show internal directories.
Click to hide internal directories.