go-zero/tools/goctl/model/sql/util/newline.go
2021-05-21 10:38:38 +08:00

9 lines
167 B
Go

package util
import "strings"
// TrimNewLine trims \r and \n chars.
func TrimNewLine(s string) string {
return strings.NewReplacer("\r", "", "\n", "").Replace(s)
}