upadted to 1.24.0; fixed stb and spiddped doubles in precene
This commit is contained in:
8
helper/sugar/string.go
Normal file
8
helper/sugar/string.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package sugar
|
||||
|
||||
import "regexp"
|
||||
|
||||
// SqueezeLine remove extra spaces and line breaks from a string
|
||||
func SqueezeLine(line string) string {
|
||||
return regexp.MustCompile(`(?m)[\n\r\t\s]+`).ReplaceAllString(line, " ")
|
||||
}
|
||||
Reference in New Issue
Block a user