// lexicographicLess compares strings alphabetically considering case.
424393
func lexicographicLess(i, j string) bool {
	iRunes := []rune(i)
	jRunes := []rune(j)

	lenShared := len(iRunes)
	if lenShared > len(jRunes) {
		lenShared = len(jRunes)
	}

	for index := 0; index < lenShared; index++ {
		ir := iRunes[index]
		jr := jRunes[index]

		if lir, ljr := unicode.ToLower(ir), unicode.ToLower(jr); lir != ljr {
			return lir < ljr
		}

		if ir != jr {
			return ir < jr
		}
	}

	return i < j
}
292862
func lexIncludeQuotedString(lx *lexer) stateFn {
	r := lx.next()
	switch {
	case r == sqStringEnd:
		lx.backup()
		lx.emit(itemInclude)
		lx.next()
		lx.ignore()
		return lx.pop()
	}
	return lexIncludeQuotedString
}
993824
func lexItem(l *lexer) stateFn {
Loop:
	for {
		switch r := l.next(); {
		case r == '{':
			l.emit(itemLeftBrace)
		case r == '}':
			l.emit(itemRightBrace)
		case r == '[':
			l.emit(itemLeftBracket)
		case r == ']':
			l.emit(itemRightBracket)
		case r == '=':
			l.emit(itemEq)
		case r == ';':
			l.emit(itemSemi)
		case r == ',':
			l.emit(itemComma)
		case isNumber(r):
			l.backup()
			return lexNumber
		case r == '"':
			return lexString
		case isSpace(r):
			l.ignore()
		case isWord(r):
			l.backup()
			return lexWord
		case r == eof:
			l.emit(itemEOF)
			break Loop
		default:
			l.emit(itemChar)
		}
	}
	return nil
}
1344927
func nonEmpty(all []string) (ne []string) {
	for _, x := range all {
		if len(x) > 0 {
			ne = append(ne, x)
		}
	}
	return ne
}
148859
func lexIdent(l *lexer) stateFn {
	// the different idents start with different unique characters.
	// peel those off.
	var itemType = itemIdent
	switch l.next() {
	case '.':
		if isDigit(l.next()) {
			itemType = itemDotIndex
		} else {
			itemType = itemDotIdent
		}
		l.backup()
	case '$':
		itemType = itemDollarIdent
	case '/':
		itemType = itemCommandEnd
	case '\\':
		itemType = itemSpecialChar
	case '?':
		dot := l.next()
		if dot != '.' {
			l.errorf("unexpected beginning to ident: ?%v", dot)
		}
		if isDigit(l.next()) {
			itemType = itemQuestionDotIndex
		} else {
			itemType = itemQuestionDotIdent
		}
		l.backup()
	}

	// absorb the rest of the identifier
	for isAlphaNumeric(l.next()) {
	}
	l.backup()
	word := l.input[l.start:l.pos]

	// if it's a builtin, return that item type
	if itemType, ok := builtinIdents[word]; ok {
		l.emit(itemType)
		// {literal} and {css} have unusual lexing rules
		switch itemType {
		case itemLiteral:
			return lexLiteral
		case itemCss:
			return lexCss
		}
		return lexInsideTag
	}
	// if not a builtin, it shouldn't start with / or \
	if itemType == itemCommandEnd || itemType == itemSpecialChar {
		var str = l.input[l.start:l.pos]
		l.pos = l.start
		return l.errorf("unrecognized identifier %q", str)
	}

	// else, use the type determined at the beginning.
	l.emit(itemType)
	return lexInsideTag
}
350150
func AsStringSlice(s interface{}) ([]string, error) {
	v := reflect.ValueOf(s)
	if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
		return nil, NewError("autorest", "AsStringSlice", "the value's type is not an array.")
	}
	stringSlice := make([]string, 0, v.Len())

	for i := 0; i < v.Len(); i++ {
		stringSlice = append(stringSlice, v.Index(i).String())
	}
	return stringSlice, nil
}
910298
func ReverseLess(Less func(i, j int) bool) func(i, j int) bool {
	return func(i, j int) bool {
		return Less(j, i)
	}
}
1295843
func (u UUIDSlice) Less(i, j int) bool {
	return u[i] < u[j]
}
741720
func (t *BTree) DescendLessOrEqual(pivot Item, iterator ItemIterator) {
	if t.root == nil {
		return
	}
	t.root.iterate(descend, pivot, nil, true, false, iterator)
}
216576
func (arguments Arguments) NonIndexed() Arguments {
	var ret []Argument
	for _, arg := range arguments {
		if !arg.Indexed {
			ret = append(ret, arg)
		}
	}
	return ret
}
117614
func NaturalLess(s, t string) bool {
	sItr := chunkIter{base: s, pos: 0}
	tItr := chunkIter{base: t, pos: 0}

	for sItr.hasNext() && tItr.hasNext() {
		sChunk := sItr.nextChunk()
		tChunk := tItr.nextChunk()

		res := compareChunks(sChunk, tChunk)

		if 0 == res {
			continue
		}

		return res < 0
	}

	return tItr.hasNext() && !sItr.hasNext()
}
1148100
func (pt PrimitiveTypes) Less(i, j int) bool {
	return pt[i] < pt[j]
}
1135583
func (t *Table) IsHeadless() bool {
	total := 0
	for i := range t.columns {
		total += len(t.columns[i].title)
	}
	return total == 0
}
1092978
func (e *SortExec) keyColumnsLess(i, j int) bool {
	rowI := e.rowChunks.GetRow(e.rowPtrs[i])
	rowJ := e.rowChunks.GetRow(e.rowPtrs[j])
	return e.lessRow(rowI, rowJ)
}
160540
func LessIgnoreCase(first string, second string) bool {
	iRunes := []rune(first)
	jRunes := []rune(second)

	max := len(iRunes)
	if max > len(jRunes) {
		max = len(jRunes)
	}

	for idx := 0; idx < max; idx++ {
		ir := iRunes[idx]
		jr := jRunes[idx]

		lir := unicode.ToLower(ir)
		ljr := unicode.ToLower(jr)

		if lir == ljr {
			continue
		}

		return lir < ljr
	}

	return false
}
670317
func (tf tFiles) searchNumLess(num int64) int {
	return sort.Search(len(tf), func(i int) bool {
		return tf[i].fd.Num < num
	})
}
992615
func lexMapKey(lx *lexer) stateFn {
	r := lx.peek()
	if isWhitespace(r) || isNL(r) || isKeySeparator(r) {
		lx.emit(itemKey)
		return lexMapKeyEnd
	}
	lx.next()
	return lexMapKey
}