// First element
197091
func (c *RangeCursor) First() ([]byte, []byte) {
	if c.Reverse {
		k, v := c.C.Seek(c.Max)

		// If Seek doesn't find a key it goes to the next.
		// If so, we need to get the previous one to avoid
		// including bigger values. #218
		if !bytes.HasPrefix(k, c.Max) && k != nil {
			k, v = c.C.Prev()
		}

		return k, v
	}

	return c.C.Seek(c.Min)
}
5881
func (c *Cursor) First() *Position {
	return &Position{IP: c.ps[0].IP, Prefix: c.ps[0]}
}
376674
func (e *FSTEnum) pushFirst() (err error) {
	arc := e.arcs[e.upto]
	assert(arc != nil)

	for {
		e.output[e.upto] = e.fst.outputs.Add(e.output[e.upto-1], arc.Output)
		if arc.Label == FST_END_LABEL {
			// final node
			break
		}
		// fmt.Printf("  pushFirst label=%c upto=%v output=%v\n",
		// 	rune(arc.Label), e.upto, e.fst.outputs.outputToString(e.output[e.upto]))
		e.spi.setCurrentLabel(arc.Label)
		e.incr()

		nextArc := e.Arc(e.upto)
		if _, err = e.fst.readFirstTargetArc(arc, nextArc, e.fstReader); err != nil {
			return
		}
		arc = nextArc
	}
	return nil
}
562045
func (h *hmnodeSeq) First() interface{} {
	if h.s != nil {
		return h.s.First()
	}
	return MapEntry{h.array[h.i], h.array[h.i+1]}
}
306318
func (ns *Namespace) FirstUpper(s interface{}) (string, error) {
	ss, err := cast.ToStringE(s)
	if err != nil {
		return "", err
	}

	return helpers.FirstUpper(ss), nil
}
1064858
func (vv VectorisedView) First() View {
	if len(vv.views) == 0 {
		return nil
	}
	return vv.views[0]
}
512285
func FirstLine(src string) (line string, err error) {
	err = Filter(src, func(_ int, l []byte) (error) {
		line = string(l)

		return io.EOF
	})

	return
}
1065289
func (s Selector) MatchFirst(n *html.Node) *html.Node {
	if s.Match(n) {
		return n
	}

	for c := n.FirstChild; c != nil; c = c.NextSibling {
		m := s.MatchFirst(c)
		if m != nil {
			return m
		}
	}
	return nil
}
158793
func (p *parser) addElement() {
	p.addChild(&Node{
		Type:     ElementNode,
		DataAtom: p.tok.DataAtom,
		Data:     p.tok.Data,
		Attr:     p.tok.Attr,
	})
}
164716
func (l *list) Front() *element {
	if l.len == 0 {
		return nil
	}
	return l.root.next
}
557635
func (d *decoder) firstVal(tag int) uint {
	f := d.features[tag]
	if len(f) == 0 {
		return 0
	}
	return f[0]
}
858685
func (l PrimaryLayer) SeekFirst() (e *PrimaryEnumerator, err error) {
	l.lock.Lock()
	e, err = l.store.SeekFirst()
	l.lock.Unlock()
	return
}
827911
func (n NameIDFormat) Element() *etree.Element {
	el := etree.NewElement("")
	el.SetText(string(n))
	return el
}
400730
func (q *LinkedBlockingDeque) AddFirst(e interface{}) error {
	if e == nil {
		return errors.New("e is nil")
	}
	if !q.OfferFirst(e) {
		return errors.New("Deque full")
	}
	return nil
}
426027
func (p *DefaultWordTokenizer) FirstLower(t *Token) bool {
	if t.Tok == "" {
		return false
	}

	runes := []rune(t.Tok)
	return unicode.IsLower(runes[0])
}
727363
func (mvl *MetricsList) First() *MetricValue {
	if len(mvl.data) > 0 {
		mvl.Sort()
		return mvl.data[0]
	}
	return nil
}
584486
func (a *AuthnContextClassRef) Element() *etree.Element {
	el := etree.NewElement("saml:AuthnContextClassRef")
	el.SetText(a.Value)
	return el
}