mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 18:00:24 +08:00
9 lines
167 B
Go
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)
|
|
}
|