landed conference mass E-mail
This commit is contained in:
+9
-1
@@ -17,7 +17,7 @@ import (
|
||||
)
|
||||
|
||||
// optionAlphabet is the alphabet from which OptionSets serialize to and from strings.
|
||||
const optionAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,-./:;<=>?@[]^_`{|}~"
|
||||
const optionAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$&()*+,-./:;<=>?@[]^_`{|}~"
|
||||
|
||||
// OptionSet is a bit set that can be persisted as a specially-constructed string.
|
||||
type OptionSet struct {
|
||||
@@ -65,3 +65,11 @@ func OptionSetFromString(s string) *OptionSet {
|
||||
}
|
||||
return &OptionSet{bits: bs}
|
||||
}
|
||||
|
||||
// OptionCharFromIndex converts an integer into the matching character from the option alphabet.
|
||||
func OptionCharFromIndex(ndx uint) string {
|
||||
if ndx > uint(len(optionAlphabet)) {
|
||||
return ""
|
||||
}
|
||||
return optionAlphabet[ndx : ndx+1]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user