// Title returns a copy of the string s in title case format.
559522
func (tc *TitleConverter) Title(s string) string {
	idx, pos := 0, 0
	t := sanitizer.Replace(s)
	end := len(t)
	return splitRE.ReplaceAllStringFunc(s, func(m string) string {
		sm := strings.ToLower(m)
		pos = strings.Index(t[idx:], m) + idx
		prev := charAt(t, pos-1)
		ext := utf8.RuneCountInString(m)
		idx = pos + ext
		if tc.ignore(sm, pos == 0 || idx == end) &&
			(prev == ' ' || prev == '-' || prev == '/') &&
			charAt(t, pos-2) != ':' && charAt(t, pos-2) != '-' &&
			(charAt(t, pos+ext) != '-' || charAt(t, pos-1) == '-') {
			return sm
		}
		return toTitle(m, prev)
	})
}
662487
func (s *BaiduMessage) SetTitle(v string) *BaiduMessage {
	s.Title = &v
	return s
}
781162
func JobTitle() string {
	job := lookup(lang, "jobs", true)
	return strings.Replace(job, "#{N}", jobTitleSuffix(), 1)
}
891021
func (p *MainPage) WriteTitle(qq422016 qtio422016.Writer) {
	
	qw422016 := qt422016.AcquireWriter(qq422016)
	
	p.StreamTitle(qw422016)
	
	qt422016.ReleaseWriter(qw422016)

}
733233
func NormalizeSeriesTitle(title string) string {
	title = optionalReplace(wordDelimiterRegex, title, "")
	title = optionalReplace(punctuationRegex, title, "")
	title = optionalReplace(commonWordRegex, title, "")
	title = optionalReplace(duplicateSpacesRegex, title, "")

	return strings.ToLower(removeSpace(title))
}
924069
func (k *Key) GetTitle() string {
	if k == nil || k.Title == nil {
		return ""
	}
	return *k.Title
}
28895
func (page *Page) getTitle(text []byte) error {
	startTag := []byte("<title>")
	startIndex := bytes.Index(text, startTag)

	endTag := []byte("</title>")
	endIndex := bytes.Index(text, endTag)

	if startIndex != -1 && endIndex != -1 {
		title := text[startIndex+len(startTag) : endIndex]

		if len(title) < 1 || !isTitle(title) {
			return ErrTitleNotFound
		}

		page.Title = string(title)
	} else {
		return ErrTitleNotFound
	}

	return nil
}
792477
func (s *CreatePullRequestInput) SetTitle(v string) *CreatePullRequestInput {
	s.Title = &v
	return s
}
1301764
func (m Method) VerbTitle() string {
	return strings.Title(strings.ToLower(m.verb))
}
682696
func (s *CreateHITTypeInput) SetTitle(v string) *CreateHITTypeInput {
	s.Title = &v
	return s
}
1273109
func TitleCase(name string) string {
	var s []rune
	upNextChar := true
	name = strings.ToLower(name)
	for _, chr := range name {
		switch {
		case upNextChar:
			upNextChar = false
			chr = ToASCIIUpper(chr)
		case chr == '_':
			upNextChar = true
			continue
		}
		s = append(s, chr)
	}
	return string(s)
}
910807
func Title(gender int) string {
	var title = ""
	switch gender {
	case Male:
		title = randomFrom(jsonData.MaleTitles)
		break
	case Female:
		title = randomFrom(jsonData.FemaleTitles)
		break
	default:
		title = FirstName(privateRand.Intn(2))
		break
	}
	return title
}
915115
func capitalize(s string) string {
	if len(s) == 0 {
		return s
	}
	x, i := utf8.DecodeRuneInString(s)
	return string(unicode.ToUpper(x)) + string(s[i:])
}
29678
func toTitle(m string, prev byte) string {
	r, size := utf8.DecodeRuneInString(m)
	return string(unicode.ToTitle(r)) + m[size:]
}
990309
func (s *Finding) SetTitle(v string) *Finding {
	s.Title = &v
	return s
}
1298229
func (s *APNSMessage) SetTitle(v string) *APNSMessage {
	s.Title = &v
	return s
}
628286
func (n Name) Title() string {
	x := strings.Split(string(n), "/")
	for i, s := range x {
		x[i] = Titleize(s)
	}

	return strings.Join(x, " ")
}