- TrimBlanChar

This commit is contained in:
gazebo
2018-09-18 11:11:00 +08:00
parent a683db7107
commit ef9da89b73

View File

@@ -186,3 +186,10 @@ func FilterMb4(content string) string {
}
return newContent.String()
}
func TrimBlanChar(str string) string {
return strings.TrimFunc(str, func(value rune) bool {
strValue := string(value)
return strValue == " " || strValue == "\t" || strValue == "\n" || strValue == "\r"
})
}