|
@@ -56,7 +56,6 @@ func init() {
|
|
|
}
|
|
|
|
|
|
//去除首尾空格、换行、回车
|
|
|
-//func RemoveHeadAndEndSpace(str) []interface{} {
|
|
|
func RemoveHeadAndEndSpace(text string) string {
|
|
|
defer qu.Catch()
|
|
|
if len(text) > 0 {
|
|
@@ -70,7 +69,7 @@ func RemoveHeadAndEndSymmetricCode(val string) string {
|
|
|
defer qu.Catch()
|
|
|
text := []rune(val)
|
|
|
if len(text) > 0 {
|
|
|
- for i := 1; i <= 2; i++ {
|
|
|
+ for i := 1; i <= 2; i++ { //循环处理两次
|
|
|
if len(text) > 0 {
|
|
|
//text = RemoveStart(i, text)
|
|
|
text = AnotherRemoveStart(text)
|
|
@@ -221,6 +220,7 @@ func OtherClean(field, text string) string {
|
|
|
if MesField[field].(bool) { //乱码
|
|
|
text = RemoveMessycode(text)
|
|
|
}
|
|
|
+ text = RemoveHeadAndEndSpace(text) //去除首尾空格
|
|
|
return text
|
|
|
}
|
|
|
|