// IsPunct determines if a character is a punctuation symbol.
497212
func IsPunct(c byte) bool {
	for _, r := range []byte("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~") {
		if c == r {
			return true
		}
	}
	return false
}
846103
func looksInternal(tok string) bool {
	internal := []string{")", `’`, `”`, `"`, `'`}
	for _, punc := range internal {
		if strings.HasSuffix(tok, punc) {
			return true
		}
	}
	return false
}
1020522
func (l *Lexer) isString(str string) bool {
	return strings.HasPrefix(l.input[l.pos:], str)
}
751387
func (s *DomainSnapshot) IsCurrent(flags uint32) (bool, error) {
	var err C.virError
	result := C.virDomainSnapshotIsCurrentWrapper(s.ptr, C.uint(flags), &err)
	if result == -1 {
		return false, makeError(&err)
	}
	if result == 1 {
		return true, nil
	}
	return false, nil
}
902073
func (g *gatewayCfg) isImplicit() bool {
	g.RLock()
	ii := g.implicit
	g.RUnlock()
	return ii
}
951954
func (f RegexFormatChecker) IsFormat(input interface{}) bool {
	asString, ok := input.(string)
	if !ok {
		return false
	}

	if asString == "" {
		return true
	}
	_, err := regexp.Compile(asString)
	return err == nil
}
269944
func (p *punctuatedReader) ReadUntilPunctuation(lim int) (res []byte, err error) {
	for {
		var n int
		n, err = p.Read(p.buf[:])
		if err == ErrPunctuated || err == nil {
			res = append(res, p.buf[0:n]...)
			if err == ErrPunctuated {
				err = nil
				return res, err
			}
			if len(res) >= lim {
				return nil, ErrOverflow
			}
		} else if err != nil {
			if err == io.EOF {
				err = io.ErrUnexpectedEOF
			}
			return nil, err
		} else if n == 0 {
			return nil, io.ErrUnexpectedEOF
		}
	}
}
169770
func (l *Lexer) IsEnd() bool {
	//u.Infof("isEnd? %v:%v", l.pos, len(l.input))
	if l.pos >= len(l.input) {
		return true
	}
	// if l.Peek() == ';' {
	// 	return true
	// }
	return false
}
946816
func HasUpperCase(str string) bool {
	if IsNull(str) {
		return true
	}
	return rxHasUpperCase.MatchString(str)
}
1223406
func (p *DefaultPunctStrings) HasSentencePunct(text string) bool {
	endPunct := `.!?`
	for _, char := range endPunct {
		for _, achar := range text {
			if char == achar {
				return true
			}
		}
	}

	return false
}
435585
func IsUTFNumeric(s string) bool {
	for _, v := range s {
		if unicode.IsNumber(v) == false {
			return false
		}
	}
	return true
}
688703
func isDFunction(n *ast.CallExpr) bool {
	ident, is := n.Fun.(*ast.Ident)
	if !is {
		return false
	}
	return ident.Name == "D"
}
798321
func isEscaped(value []rune, b rune) bool {
	if len(value) == 0 {
		return false
	}

	switch b {
	case '\'': // single quote
	case '"': // quote
	case 'n': // newline
	case 't': // tab
	case '\\': // backslash
	default:
		return false
	}

	return value[len(value)-1] == '\\'
}
883586
func (p *DefaultWordTokenizer) IsEllipsis(t *Token) bool {
	return t.reEllipsis.MatchString(t.Tok)
}
56147
func IsFunc(kindable interface {
	Kind() reflect.Kind
}) bool {
	return kindable.Kind() == reflect.Func
}
102453
func isVersion(s string) bool {
	hasPunct := false
	onlyNumber := true
	onlyHexLetter := true
	for _, r := range s {
		isNumber := unicode.IsNumber(r)
		isLetter := unicode.IsLetter(r)

		hasPunct = hasPunct || unicode.IsPunct(r)
		onlyNumber = onlyNumber && isNumber

		if isLetter {
			low := unicode.ToLower(r)
			onlyHexLetter = onlyHexLetter && low <= 'f'
		}
	}
	if hasPunct {
		return true
	}
	if !onlyHexLetter {
		return true
	}

	num, err := strconv.ParseInt(s, 10, 64)
	if err == nil {
		if num > 100 {
			return false // numeric revision.
		}
	}

	if len(s) > 5 && onlyHexLetter {
		return false // hex revision
	}
	return true
}
605572
func UpdateJoinStylePrediction(data string, sep rune) (rune, error) {
	punctsFound := map[rune]bool{}

	for _, r := range data {
		if unicode.IsPunct(r) {
			punctsFound[r] = true
		}
	}

	caseChangesFound, err := regexp.MatchString(`\p{Ll}\p{Lu}|\p{Lu}\p{Ll}`, data)
	if err != nil {
		print(err.Error())
		return -1, err
	}

	if len(punctsFound) == 0 && !caseChangesFound {
		// Could not find a symbol or a caseChange. Just give up and
		// continue with what we had before.
		return sep, nil
	}

	if len(punctsFound) > 1 {
		// Too many symbols found.
		return 0, ErrInconsistentData
	}

	if sep > 1 && !punctsFound[sep] {
		// sep was non-empty, which means we expected it to be found in this string.
		// Since we found at least one thing, we have an inconsistency.
		return 0, ErrInconsistentData
	}

	for k := range punctsFound {
		// Return the first and only symbol we found.
		return k, nil
	}

	if caseChangesFound {
		return 1, nil
	} else {
		return 0, nil
	}
}