func ToIdentifier(s string) string {
	s = subUnderscores(strings.TrimSpace(s))
	s = underscoreRE.ReplaceAllString(s, "_")
	s = leadingRE.ReplaceAllString(s, "_")
	s = strings.TrimLeft(s, "_")
	s = strings.TrimRight(s, "_")
	return s
}
ToIdentifier cleans s so that it is usable as an identifier.

Substitutes invalid characters with an underscore, removes any leading
numbers/underscores, and removes trailing underscores.

Additionally collapses multiple underscores to a single underscore.

Makes no changes to case.
package snaker
import (
	"regexp"
	"strings"
	"unicode"
)
func init() {
	DefaultInitialisms, _ = New(CommonInitialisms()...)
}
func CommonInitialisms() []string {
	return []string{
		"ACL",
		"API",
		"ASCII",
		"CPU",
		"CSS",
		"DNS",
		"EOF",
		"GUID",
		"HTML",
		"HTTPS",
		"HTTP",
		"ID",
		"IP",
		"JSON",
		"LHS",
		"QPS",
		"RAM",
		"RHS",
		"RPC",
		"SLA",
		"SMTP",
		"SQL",
		"SSH",
		"TCP",
		"TLS",
		"TTL",
		"UDP",
		"UID",
		"UI",
		"URI",
		"URL",
		"UTC",
		"UTF8",
		"UUID",
		"VM",
		"XML",
		"XMPP",
		"XSRF",
		"XSS",
		"YAML",
	}
}
var DefaultInitialisms *Initialisms
func CamelToSnake(name string) string {
	return DefaultInitialisms.CamelToSnake(name)
}
func CamelToSnakeIdentifier(name string) string {
	return DefaultInitialisms.CamelToSnakeIdentifier(name)
}
func SnakeToCamel(name string) string {
	return DefaultInitialisms.SnakeToCamel(name)
}
func SnakeToCamelIdentifier(name string) string {
	return DefaultInitialisms.SnakeToCamelIdentifier(name)
}
func ForceCamelIdentifier(name string) string {
	return DefaultInitialisms.ForceCamelIdentifier(name)
}
func ForceLowerCamelIdentifier(name string) string {
	return DefaultInitialisms.ForceLowerCamelIdentifier(name)
}
func Peek(r []rune) string {
	return DefaultInitialisms.Peek(r)
}
func IsInitialism(s string) bool {
	return DefaultInitialisms.IsInitialism(s)
}
func IsIdentifierChar(ch rune) bool {
	return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch == '_' || ch >= 0x80 && unicode.IsLetter(ch) ||
		'0' <= ch && ch <= '9' || ch >= 0x80 && unicode.IsDigit(ch)
}