// NormalizeURITitle does NormalizeURI with first character in upper case
352766
func NormalizeURITitle(URI string) string {
	s := strings.Title(doNormalizeURI(URI))
	return strings.Replace(s, " ", "", -1)

}
363368
func (a *Attachment) GetTitle() string {
	if a == nil || a.Title == nil {
		return ""
	}
	return *a.Title
}
805614
func (c *CheckRunOutput) GetTitle() string {
	if c == nil || c.Title == nil {
		return ""
	}
	return *c.Title
}
1071104
func UnicodeToLowerASCII(s string) []byte {
	return []byte(strings.Map(func(r rune) rune { return unicode.ToLower(ToASCII(r)) }, s))
}
639363
func (s *Exclusion) SetTitle(v string) *Exclusion {
	s.Title = &v
	return s
}
910185
func (f *Fpdf) SetTitle(titleStr string, isUTF8 bool) {
	if isUTF8 {
		titleStr = utf8toutf16(titleStr)
	}
	f.title = titleStr
}
1319001
func NormalizePath(path string) string {
	pointer, err := filepath.EvalSymlinks(path)
	if err != nil {
		return path
	}
	abs, err := filepath.Abs(pointer)
	if err != nil {
		return pointer
	}
	return abs
}
326465
func (i *Issue) GetTitle() string {
	if i == nil || i.Title == nil {
		return ""
	}
	return *i.Title
}
1298700
func (p *Phrase) Normalize() error {
	if p != nil {
		if p.Name == "" {
			return fmt.Errorf("empty ID")
		}
		for _, s := range p.Stages {
			if err := s.Normalize(); err != nil {
				return err
			}
		}
		if p.ReturnStage == nil {
			p.ReturnStage = &ReturnStage{Retval: 1}
		}
	}
	return nil
}
1127376
func normalizePath(path string) string {
	path = filepath.Clean(path)

	switch path {
	case ".":
		return FilePathSeparator
	case "..":
		return FilePathSeparator
	default:
		return path
	}
}
1359519
func MustNormalizeURLString(u string, f NormalizationFlags) string {
	result, e := NormalizeURLString(u, f)
	if e != nil {
		panic(e)
	}
	return result
}
1043846
func (auth *Auth) NormalizedString(t AuthType) string {
	str := "hawk." + headerVersion + "." + t.String() + "\n" +
		strconv.FormatInt(auth.Timestamp.Unix(), 10) + "\n" +
		auth.Nonce + "\n" +
		auth.Method + "\n" +
		auth.RequestURI + "\n" +
		auth.Host + "\n" +
		auth.Port + "\n" +
		base64.StdEncoding.EncodeToString(auth.Hash) + "\n" +
		auth.Ext + "\n"

	if auth.Credentials.App != "" {
		str += auth.Credentials.App + "\n"
		str += auth.Credentials.Delegate + "\n"
	}

	return str
}
1212259
func NormalizeURLString(u string, f NormalizationFlags) (string, error) {
	parsed, err := url.Parse(u)
	if err != nil {
		return "", err
	}

	if f&FlagLowercaseHost == FlagLowercaseHost {
		parsed.Host = strings.ToLower(parsed.Host)
	}

	// The idna package doesn't fully conform to RFC 5895
	// (https://tools.ietf.org/html/rfc5895), so we do it here.
	// Taken from Go 1.8 cycle source, courtesy of bradfitz.
	// TODO: Remove when (if?) idna package conforms to RFC 5895.
	parsed.Host = width.Fold.String(parsed.Host)
	parsed.Host = norm.NFC.String(parsed.Host)
	if parsed.Host, err = idna.ToASCII(parsed.Host); err != nil {
		return "", err
	}

	return NormalizeURL(parsed, f), nil
}
80001
func normalizeHelper(number string,
	normalizationReplacements map[rune]rune,
	removeNonMatches bool) string {

	var normalizedNumber = builder.NewBuilder(nil)
	for _, character := range number {
		newDigit, ok := normalizationReplacements[unicode.ToUpper(character)]
		if ok {
			normalizedNumber.WriteRune(newDigit)
		} else if !removeNonMatches {
			normalizedNumber.WriteRune(character)
		}
		// If neither of the above are true, we remove this character.
	}
	return normalizedNumber.String()
}
121433
func formatProcName(fullURI string) string {
	// remove leading `/`
	fullURI = fullURI[1:]

	// When meet `/{`
	// - replace it with `By`
	// - make uppercase the first char after `/{`
	spl := strings.Split(fullURI, "/{")
	tmp := []string{}
	for i, v := range spl {
		if i != 0 {
			v = strings.Title(v)
		}
		tmp = append(tmp, v)
	}
	name := strings.Join(tmp, "By")

	// when meet `/`
	// - make uppercase the first char after `/`
	// - remove the `/`
	spl = strings.Split(name, "/")
	tmp = []string{}
	for i, v := range spl {
		if i != 0 {
			v = strings.Title(v)
		}
		tmp = append(tmp, v)
	}

	return strings.Join(tmp, "")
}
407438
func (m *Module) Normalized() string {
	return m.formatWithPrefix(m.normalizedHostPrefix(m.Host().Normalized()), false)
}
473144
func (p *CipdPackage) Normalize() error {
	if p.Name == "" {
		return errors.New("missing name")
	}
	if p.Version == "" {
		return errors.New("missing version")
	}
	return nil
}