// ConsolidateByTitle implements the MsgConsolidateFunc signature
// by consolidating trace message when their titles are the same.
552584
func ConsolidateByTitle(next *Msg, prev *Msg) *Msg {
	if prev == nil || prev.Title != next.Title {
		return next
	}

	prev.Repeats++
	return nil
}
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
}
1209630
func (a *AggMetric) SyncAggregatedChunkSaveState(ts uint32, consolidator consolidation.Consolidator, aggSpan uint32) {
	// no lock needed cause aggregators don't change at runtime
	for _, a := range a.aggregators {
		if a.span == aggSpan {
			switch consolidator {
			case consolidation.None:
				panic("cannot get an archive for no consolidation")
			case consolidation.Avg:
				panic("avg consolidator has no matching Archive(). you need sum and cnt")
			case consolidation.Cnt:
				if a.cntMetric != nil {
					a.cntMetric.SyncChunkSaveState(ts)
				}
				return
			case consolidation.Min:
				if a.minMetric != nil {
					a.minMetric.SyncChunkSaveState(ts)
				}
				return
			case consolidation.Max:
				if a.maxMetric != nil {
					a.maxMetric.SyncChunkSaveState(ts)
				}
				return
			case consolidation.Sum:
				if a.sumMetric != nil {
					a.sumMetric.SyncChunkSaveState(ts)
				}
				return
			case consolidation.Lst:
				if a.lstMetric != nil {
					a.lstMetric.SyncChunkSaveState(ts)
				}
				return
			default:
				panic(fmt.Sprintf("internal error: no such consolidator %q with span %d", consolidator, aggSpan))
			}
		}
	}
}
523692
func (r Security_Certificate) FindByCommonName(commonName *string) (resp []datatypes.Security_Certificate, err error) {
	params := []interface{}{
		commonName,
	}
	err = r.Session.DoRequest("SoftLayer_Security_Certificate", "findByCommonName", params, &r.Options, &resp)
	return
}
596816
func (s *CampaignEmailMessage) SetTitle(v string) *CampaignEmailMessage {
	s.Title = &v
	return s
}
721558
func (p Pages) ByTitle() Pages {

	const key = "pageSort.ByTitle"

	title := func(p1, p2 Page) bool {
		return p1.Title() < p2.Title()
	}

	pages, _ := spc.get(key, pageBy(title).Sort, p)
	return pages
}
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)
}
428156
func (c *Callbacks) OnCUserMessageGameTitle(fn func(*dota.CUserMessageGameTitle) error) {
	c.onCUserMessageGameTitle = append(c.onCUserMessageGameTitle, fn)
}
520300
func (item *MenuItem) SetTitle(title string) {
	item.title = title
	item.update()
}
682696
func (s *CreateHITTypeInput) SetTitle(v string) *CreateHITTypeInput {
	s.Title = &v
	return s
}
1301764
func (m Method) VerbTitle() string {
	return strings.Title(strings.ToLower(m.verb))
}
171636
func interpolationFuncTitle() ast.Function {
	return ast.Function{
		ArgTypes:   []ast.Type{ast.TypeString},
		ReturnType: ast.TypeString,
		Callback: func(args []interface{}) (interface{}, error) {
			toTitle := args[0].(string)
			return strings.Title(toTitle), nil
		},
	}
}
781162
func JobTitle() string {
	job := lookup(lang, "jobs", true)
	return strings.Replace(job, "#{N}", jobTitleSuffix(), 1)
}
883349
func (s *ExclusionPreview) SetTitle(v string) *ExclusionPreview {
	s.Title = &v
	return s
}
923981
func (ns *Namespace) Title(s interface{}) (string, error) {
	ss, err := cast.ToStringE(s)
	if err != nil {
		return "", err
	}

	return ns.titleFunc(ss), nil
}
681963
func (s *ComplianceItemEntry) SetTitle(v string) *ComplianceItemEntry {
	s.Title = &v
	return s
}
887040
func (s *HIT) SetTitle(v string) *HIT {
	s.Title = &v
	return s
}