newline.go 167 B

12345678
  1. package util
  2. import "strings"
  3. // TrimNewLine trims \r and \n chars.
  4. func TrimNewLine(s string) string {
  5. return strings.NewReplacer("\r", "", "\n", "").Replace(s)
  6. }