// FirstLower is true if the token's first character is lowercase
426027
func (p *DefaultWordTokenizer) FirstLower(t *Token) bool {
	if t.Tok == "" {
		return false
	}

	runes := []rune(t.Tok)
	return unicode.IsLower(runes[0])
}
626099
func filterLower(ctx stick.Context, val stick.Value, args ...stick.Value) stick.Value {
	return strings.ToLower(stick.CoerceString(val))
}
734070
func CaseInsensitive(tokens ...string) Option {
	return func(p *Parser) error {
		for _, token := range tokens {
			p.caseInsensitive[token] = true
		}
		return nil
	}
}
391350
func MaxFirstChars(inStr string, maxCharCount int) string {
	return genericTrim(inStr, maxCharCount, false, false)
}
1309692
func toLowerCaseASCII(in string) string {
	// If the string is already lower-case then there's nothing to do.
	isAlreadyLowerCase := true
	for _, c := range in {
		if c == utf8.RuneError {
			// If we get a UTF-8 error then there might be
			// upper-case ASCII bytes in the invalid sequence.
			isAlreadyLowerCase = false
			break
		}
		if 'A' <= c && c <= 'Z' {
			isAlreadyLowerCase = false
			break
		}
	}

	if isAlreadyLowerCase {
		return in
	}

	out := []byte(in)
	for i, c := range out {
		if 'A' <= c && c <= 'Z' {
			out[i] += 'a' - 'A'
		}
	}
	return string(out)
}
627042
func LowerInitial(str string) string {
	for i, v := range str {
		return string(unicode.ToLower(v)) + str[i+1:]
	}
	return ""
}
1198922
func camelToLowerCamel(s string) string {
	ss := strings.Split(s, "")
	ss[0] = strings.ToLower(ss[0])

	return strings.Join(ss, "")
}
624870
func ToLowerString(b byte) string {
	if IsUpper(b) {
		b = b - 'A' + 'a'
	}

	return string(b)
}
309345
func lowerFirst(s string) string {
	if s == "" {
		return ""
	}
	r, n := utf8.DecodeRuneInString(s)
	return string(unicode.ToLower(r)) + s[n:]
}
306318
func (ns *Namespace) FirstUpper(s interface{}) (string, error) {
	ss, err := cast.ToStringE(s)
	if err != nil {
		return "", err
	}

	return helpers.FirstUpper(ss), nil
}
791269
func (s *i18nSorter) Less(i, j int) bool {

	iValue := strings.ToLower(s.getComparisonValueFunc(s.toBeSorted[i]))
	jValue := strings.ToLower(s.getComparisonValueFunc(s.toBeSorted[j]))

	// if it's a local sort, use the collator
	if s.collator != nil {
		return s.collator.CompareString(iValue, jValue) == -1
	}

	// for universal sorts, normalize the unicode to sort
	normalizer := norm.NFKD
	iValue = normalizer.String(iValue)
	jValue = normalizer.String(jValue)

	return bytes.Compare([]byte(iValue), []byte(jValue)) == -1
}
706733
func (hg *Histogram) GetLower(idx int) *types.Datum {
	d := hg.Bounds.GetRow(2*idx).GetDatum(0, hg.Tp)
	return &d
}
1080598
func ToSlugLowerString(s string) string {
	return string(ToSlug([]byte(strings.ToLower(s))))
}
1054077
func builtinLower(args []types.Datum, _ context.Context) (d types.Datum, err error) {
	x := args[0]
	switch x.Kind() {
	case types.KindNull:
		return d, nil
	default:
		s, err := x.ToString()
		if err != nil {
			return d, errors.Trace(err)
		}
		d.SetString(strings.ToLower(s))
		return d, nil
	}
}
1373159
func capitalizeFirst(s string) string {
	switch l := len(s); l {
	case 0:
		return s
	case 1:
		return strings.ToLower(s)
	default:
		return strings.ToUpper(string(s[0])) + strings.ToLower(s[1:])
	}
}
1307048
func (p *DefaultWordTokenizer) FirstUpper(t *Token) bool {
	if t.Tok == "" {
		return false
	}

	runes := []rune(t.Tok)
	return unicode.IsUpper(runes[0])
}
281955
func (l *Leader) getLowestSequence() (string, uint64, error) {
	children, _, err := l.c.Children(l.path)
	if err != nil {
		return "", 0, xlateError(err)
	}
	var lowestSeq uint64 = math.MaxUint64
	firstChild := ""
	for _, p := range children {
		s, err := parseSeq(p)
		if err != nil {
			return "", 0, xlateError(err)
		}
		if s < lowestSeq {
			lowestSeq = s
			firstChild = p
		}
	}
	if lowestSeq == math.MaxUint64 {
		return "", 0, ErrNoLeaderFound
	}
	return path.Join(l.path, firstChild), lowestSeq, nil
}