// Like BoolVar, but accepts a shorthand letter that can be used after a single dash.
435046
func (f *FlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string) {
	f.VarP(newBoolValue(value, p), name, shorthand, usage)
}
631429
func IsUTFLetterNumeric(s string) bool {
	for _, v := range s {
		if !unicode.IsLetter(v) && !unicode.IsNumber(v) { //letters && numbers are ok
			return false
		}
	}
	return true
}
1236809
func (p *DefaultWordTokenizer) IsAlpha(t *Token) bool {
	return t.reAlpha.MatchString(t.Tok)
}
1204286
func isAlNum(r rune) bool {
	return r == '_' || unicode.IsLetter(r) || unicode.IsDigit(r)
}
797886
func (fs *FlagSet) Bool(names []string, value bool, usage string) *bool {
	p := new(bool)
	fs.BoolVar(p, names, value, usage)
	return p
}
410842
func (rp *Reply) BoolValue() (bool, error) {
	if rp.Type == ErrorReply {
		return false, errors.New(rp.Error)
	}
	if rp.Type != IntegerReply {
		return false, errors.New("invalid reply type, not integer")
	}
	return rp.Integer != 0, nil
}
117126
func BoolForString(s string) bool {
	s = strings.TrimSpace(s)
	if s == "" || s == "0" || s == "false" || s == "no" {
		return false
	}
	return true
}
94685
func KeyIsAlpha(event termbox.Event) bool {
	k := event.Ch
	if (k >= 'a' && k <= 'z') || (k >= 'A' && k <= 'Z') {
		return true
	}
	return false
}
76078
func letterOnlyMapF(rune rune) rune {
	switch {
	case 'A' <= rune && rune <= 'Z':
		return rune
	case 'a' <= rune && rune <= 'z':
		return rune - 32
	}
	return -1
}
792889
func (n Name) ToLowerCamelCase() string {
	for i, word := range n {
		if i == 0 {
			n[i] = strings.ToLower(word)
			continue
		}
		r, size := utf8.DecodeRuneInString(word)
		n[i] = string(unicode.ToUpper(r)) + strings.ToLower(word[size:])
	}
	return strings.Join(n, "")
}
223054
func AsBool(v string) bool {
	if v == "" {
		return false
	}
	out, _ := ParseBool(v)
	return out
}
789371
func Less(s, t string) bool {
	return LessRunes([]rune(s), []rune(t))
}
461898
func SockAddrAttr(sa SockAddr, selector AttrName) string {
	fn, found := sockAddrAttrMap[selector]
	if !found {
		return ""
	}

	return fn(sa)
}
469316
func BoolValue(r *http.Request, k string) bool {
	s := strings.ToLower(strings.TrimSpace(r.FormValue(k)))
	return !(s == "" || s == "0" || s == "no" || s == "false" || s == "none")
}
1160133
func Confirmer(defaultYes bool) Func {
	return func(input string) error {
		if defaultYes {
			if input == "" || input == "y" || input == "N" {
				return nil
			}

			return NewValidationError("You must specify either 'y' for yes or 'N' for no.")
		}

		if input == "" || input == "Y" || input == "n" {
			return nil
		}

		return NewValidationError("You must specify either 'Y' for yes or 'n' for no.")
	}
}
941947
func (lx *lexer) isBool() bool {
	str := strings.ToLower(lx.input[lx.start:lx.pos])
	return str == "true" || str == "false" ||
		str == "on" || str == "off" ||
		str == "yes" || str == "no"
}
1110949
func (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool {
	p := new(bool)
	f.BoolVarP(p, name, shorthand, value, usage)
	return p
}