go-zero/tools/goctl/model/sql/util/newline.go

9 lines
167 B
Go
Raw Normal View History

2021-05-12 12:28:23 +08:00
package util
import "strings"
// TrimNewLine trims \r and \n chars.
2021-05-12 12:28:23 +08:00
func TrimNewLine(s string) string {
return strings.NewReplacer("\r", "", "\n", "").Replace(s)
2021-05-12 12:28:23 +08:00
}