// Blink returns a new style based on s, with the blink attribute set
// as requested.
504056
func (s Style) Blink(on bool) Style {
	return s.setAttrs(Style(AttrBlink), on)
}
1090132
func NewStyle(name, val string) *Style {
	s := Style{Name: name, Value: val}
	return &s
}
614472
func (b *LEDDriver) Wink() (err error) {
	buf := []byte{0x08, 0x0B, 0x00, 0x11, 0x0E}
	err = b.WriteMatrix(buf)
	return
}
798509
func (l *LLk) Peek(k int) (*lexer.Token, error) {
	if k > l.k {
		return nil, fmt.Errorf("grammar.LLk: cannot look ahead %v beyond defined %v", k, l.k)
	}
	if k <= 0 {
		return nil, fmt.Errorf("grammar.LLk: invalid look ahead value %v", k)
	}
	return &l.tkns[k], nil
}
38118
func (g *globTokeniser) Peek() bool {
	if !g.hasPeek {
		g.peekToken, g.peekTokenType, g.peekErr = g.parse(g.tokenType)
		g.hasPeek = true
	}

	return g.peekErr == nil
}
706762
func (s Style) Background(c Color) Style {
	if c == ColorDefault {
		return (s &^ (0x1ffffff | styleBgSet))
	}
	return (s &^ (0x1ffffff)) | (Style(c) & 0x1ffffff) | styleBgSet
}
291514
func Color(s, style string) string {
	if plain || len(style) < 1 {
		return s
	}
	buf := colorCode(style)
	buf.WriteString(s)
	buf.WriteString(Reset)
	return buf.String()
}
529012
func (r *Ring) Peek() interface{} {
	r.Lock()
	defer r.Unlock()

	r.checkInit()
	if r.head == -1 {
		return nil
	}
	return r.get(r.tail)
}
964835
func (b *Buffer) Peek() float64 {
	if b.size == 0 {
		return 0
	}
	return b.array[b.head]
}
169724
func (s *Style) Clone() *Style {
	return &Style{Name: s.Name, Value: s.Value}
}
1262059
func (options *FontOptions) GetHintStyle() HintStyle {
	ret := HintStyle(C.cairo_font_options_get_hint_style(options.Ptr))
	if err := options.status(); err != nil {
		panic(err)
	}
	return ret
}
1226411
func (b *BlinkMDriver) Color() (color []byte, err error) {
	if _, err = b.connection.Write([]byte("g")); err != nil {
		return
	}
	data := []byte{0, 0, 0}
	read, err := b.connection.Read(data)
	if read != 3 || err != nil {
		return []byte{}, err
	}
	return []byte{data[0], data[1], data[2]}, nil
}
1166713
func (ns *Namespace) CSS(a interface{}) (template.CSS, error) {
	s, err := cast.ToStringE(a)
	return template.CSS(s), err
}
1270705
func ColorFunc(style string) func(string) string {
	if style == "" {
		return func(s string) string {
			return s
		}
	}
	color := ColorCode(style)
	return func(s string) string {
		if plain || s == "" {
			return s
		}
		buf := bytes.NewBufferString(color)
		buf.WriteString(s)
		buf.WriteString(Reset)
		result := buf.String()
		return result
	}
}
1226413
func (element *Element) addStyleRule(styleRule *StyleRule) {
	element.styleRules = append(element.styleRules, styleRule)
}
803361
func (lx *lexer) peek() rune {
	r := lx.next()
	lx.backup()
	return r
}
77675
func (z *TokenBuffer) Attributes(hashes ...svg.Hash) ([]*Token, *Token) {
	n := 0
	for {
		if t := z.Peek(n); t.TokenType != xml.AttributeToken {
			break
		}
		n++
	}
	if len(hashes) > cap(z.attrBuffer) {
		z.attrBuffer = make([]*Token, len(hashes))
	} else {
		z.attrBuffer = z.attrBuffer[:len(hashes)]
		for i := range z.attrBuffer {
			z.attrBuffer[i] = nil
		}
	}
	var replacee *Token
	for i := z.pos; i < z.pos+n; i++ {
		attr := &z.buf[i]
		for j, hash := range hashes {
			if hash == attr.Hash {
				z.attrBuffer[j] = attr
				replacee = attr
			}
		}
	}
	return z.attrBuffer, replacee
}