/* Title */
// SetTitle sets a title of terminal window.
968579
func (w *VT100Writer) SetTitle(title string) {
	titleBytes := []byte(title)
	patterns := []struct {
		from []byte
		to   []byte
	}{
		{
			from: []byte{0x13},
			to:   []byte{},
		},
		{
			from: []byte{0x07},
			to:   []byte{},
		},
	}
	for i := range patterns {
		titleBytes = bytes.Replace(titleBytes, patterns[i].from, patterns[i].to, -1)
	}

	w.WriteRaw([]byte{0x1b, ']', '2', ';'})
	w.WriteRaw(titleBytes)
	w.WriteRaw([]byte{0x07})
	return
}
1348140
func (e *Env) SetName(n string) {
	e.Lock()
	e.name = n
	e.Unlock()
}
634503
func (c *Commit) Title() string {
	switch lines := strings.SplitN(c.Description, "\n", 2); len(lines) {
	case 0:
		return ""
	case 1:
		return c.Description
	default:
		return lines[0]
	}
}
432667
func (p *PortDefinition) SetName(name string) *PortDefinition {
	p.Name = name
	return p
}
622201
func (s *DefaultPushNotificationMessage) SetTitle(v string) *DefaultPushNotificationMessage {
	s.Title = &v
	return s
}
145521
func (s *KeyPhrase) SetText(v string) *KeyPhrase {
	s.Text = &v
	return s
}
79210
func (window *Window) SetTitle(title string) {
	C.SDL_SetWindowTitle(window.cptr(), C.CString(title))
}
659516
func (b *Bot) SetGroupTitle(chat *Chat, newTitle string) error {
	params := map[string]string{
		"chat_id": chat.Recipient(),
		"title":   newTitle,
	}

	respJSON, err := b.Raw("setChatTitle", params)
	if err != nil {
		return err
	}

	return extractOkResponse(respJSON)
}
768956
func (s *SyntaxToken) SetText(v string) *SyntaxToken {
	s.Text = &v
	return s
}
897636
func (s *Disk) SetName(v string) *Disk {
	s.Name = &v
	return s
}
1111862
func (b *Box) SetTitleColor(color tcell.Color) *Box {
	b.titleColor = color
	return b
}
48189
func (s *DetectSentimentInput) SetText(v string) *DetectSentimentInput {
	s.Text = &v
	return s
}
388132
func (s *CreateHITInput) SetTitle(v string) *CreateHITInput {
	s.Title = &v
	return s
}
340475
func (s *Button) SetText(v string) *Button {
	s.Text = &v
	return s
}
582188
func (s *ASN1Subject) SetTitle(v string) *ASN1Subject {
	s.Title = &v
	return s
}
910185
func (f *Fpdf) SetTitle(titleStr string, isUTF8 bool) {
	if isUTF8 {
		titleStr = utf8toutf16(titleStr)
	}
	f.title = titleStr
}
681179
func (s *Command) SetName(v string) *Command {
	s.Name = &v
	return s
}