func UnderscoreToCamelCase(s string) string {
	return strings.Replace(strings.Title(strings.Replace(strings.ToLower(s), "_", " ", -1)), " ", "", -1)
}
UnderscoreToCamelCase converts from underscore separated form to camel case form.
Ex.: my_func => MyFunc
package govalidator
import (
	"errors"
	"fmt"
	"html"
	"path"
	"regexp"
	"strings"
	"unicode"
)
func Contains(str, substring string) bool {
	return strings.Contains(str, substring)
}
func Matches(str, pattern string) bool {
	match, _ := regexp.MatchString(pattern, str)
	return match
}
func LeftTrim(str, chars string) string {
	pattern := ""
	if chars == "" {
		pattern = "^\\s+"
	} else {
		pattern = "^[" + chars + "]+"
	}
	r, _ := regexp.Compile(pattern)
	return string(r.ReplaceAll([]byte(str), []byte("")))
}
func RightTrim(str, chars string) string {
	pattern := ""
	if chars == "" {
		pattern = "\\s+$"
	} else {
		pattern = "[" + chars + "]+$"
	}
	r, _ := regexp.Compile(pattern)
	return string(r.ReplaceAll([]byte(str), []byte("")))
}
func Trim(str, chars string) string {
	return LeftTrim(RightTrim(str, chars), chars)
}
func WhiteList(str, chars string) string {
	pattern := "[^" + chars + "]+"
	r, _ := regexp.Compile(pattern)
	return string(r.ReplaceAll([]byte(str), []byte("")))
}
func BlackList(str, chars string) string {
	pattern := "[" + chars + "]+"
	r, _ := regexp.Compile(pattern)
	return string(r.ReplaceAll([]byte(str), []byte("")))
}
func StripLow(str string, keepNewLines bool) string {
	chars := ""
	if keepNewLines {
		chars = "\x00-\x09\x0B\x0C\x0E-\x1F\x7F"
	} else {
		chars = "\x00-\x1F\x7F"
	}
	return BlackList(str, chars)
}
func ReplacePattern(str, pattern, replace string) string {
	r, _ := regexp.Compile(pattern)
	return string(r.ReplaceAll([]byte(str), []byte(replace)))
}
var Escape = html.EscapeString
func addSegment(inrune, segment []rune) []rune {
	if len(segment) == 0 {
		return inrune
	}
	if len(inrune) != 0 {
		inrune = append(inrune, '_')
	}
	inrune = append(inrune, segment...)
	return inrune
}