// isUTF8 returns whether name is a fuzzy variation of the string "UTF-8".
420684
func isUTF8(name string) bool {
	// Recognize all sorts of silly things as "UTF-8", like Postgres does
	s := strings.Map(alnumLowerASCII, name)
	return s == "utf8" || s == "unicode"
}
481958
func (r *Store) GetUint8(key string) (uint8, error) {
	v, ok := r.GetEntry(key)
	if !ok {
		return 0, errFindParse.Format("uint8", key)
	}
	return v.Uint8Default(0)
}
843013
func IsValidUnixUser(u string) bool {
	/* See http://www.unix.com/man-page/linux/8/useradd:

		On Debian, the only constraints are that usernames must neither start with a dash ('-')
	    nor contain a colon (':') or a whitespace (space: ' ', end of line: '\n', tabulation:
	    '\t', etc.). Note that using a slash ('/') may break the default algorithm for the
	    definition of the user's home directory.

	*/
	if len(u) > maxUsernameLen || len(u) == 0 || u[0] == '-' {
		return false
	}
	if strings.ContainsAny(u, ":/") {
		return false
	}
	for _, r := range u {
		if unicode.IsSpace(r) || unicode.IsControl(r) {
			return false
		}
	}
	return true
}
210563
func (f *Fn) IsUTF16() bool {
	s := f.DLLFuncName()
	return s[len(s)-1] == 'W'
}
1072515
func (g *Group) Uint8() *Statement {
	// notest
	s := Uint8()
	g.items = append(g.items, s)
	return s
}
922361
func isHex(str string) bool {
	if len(str)%2 != 0 {
		return false
	}
	for _, c := range []byte(str) {
		if !isHexCharacter(c) {
			return false
		}
	}
	return true
}
600853
func isChar(d os.FileInfo) bool {
	stat := d.Sys().(*syscall.Stat_t)
	return (stat.Mode & syscall.S_IFMT) == syscall.S_IFCHR
}
898992
func IsSlugAscii(s string) bool {
	dash := true
	for _, r := range s {
		switch {
		case r == '-':
			if dash {
				return false
			}
			dash = true
		case 'a' <= r && r <= 'z', '0' <= r && r <= '9':
			dash = false
		default:
			return false
		}
	}
	return !dash
}
1209965
func (i Data) IsInf() (int, bool) {
	if len(i) != 4 {
		return 0, false
	}
	if strings.EqualFold(string(i), "-Inf") {
		return -1, true
	}
	if strings.EqualFold(string(i), "+Inf") {
		return +1, true
	}
	return 0, false
}
250934
func Unicode16ToUTF8(str string) string {
	i := 0
	if strings.Index(str, `\u`) > 0 {
		i = 1
	}
	strSlice := strings.Split(str, `\u`)
	last := len(strSlice) - 1
	if len(strSlice[last]) > 4 {
		strSlice = append(strSlice, string(strSlice[last][4:]))
		strSlice[last] = string(strSlice[last][:4])
	}
	for ; i <= last; i++ {
		if x, err := strconv.ParseInt(strSlice[i], 16, 32); err == nil {
			strSlice[i] = string(x)
		}
	}
	return strings.Join(strSlice, "")
}
1211807
func isStringUppercase(s string) bool {
	if strings.ToUpper(s) != s {
		return false
	}
	for _, c := range []rune(s) {
		if unicode.IsUpper(c) {
			return true
		}
	}
	return false
}
688703
func isDFunction(n *ast.CallExpr) bool {
	ident, is := n.Fun.(*ast.Ident)
	if !is {
		return false
	}
	return ident.Name == "D"
}
433594
func (p *Lexer) Token8() (string, bool) {

	var buf []rune

	for {
		c, _ := p.Rune()
		if !isTokenChar(c) {
			break
		}
		buf = append(buf, c)
	}

	p.UnreadRune()
	return string(buf), len(buf) > 0
}
435819
func UnicodeString(table *unicode.RangeTable) gopter.Gen {
	return genString(UnicodeChar(table), func(ch rune) bool {
		return unicode.Is(table, ch)
	})
}
636655
func (reg *typeRegistry) IsStringTypeName(tn TypeRef) bool {
	t := reg.FindType(tn)
	if t == nil {
		return false
	}
	return reg.IsStringType(t)
}
1020522
func (l *Lexer) isString(str string) bool {
	return strings.HasPrefix(l.input[l.pos:], str)
}
119955
func (b *byteReader) Uint8() uint8 {
	v := b.b[b.off]
	return v
}