moreline.go 384 B

1234567891011121314
  1. // Copyright 2025 BackendServerTemplate Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package cleanstringutils
  5. import "strings"
  6. func GetString(data string) (res string) {
  7. res = strings.Replace(data, "\r", "", -1)
  8. res = strings.Split(res, "\n")[0]
  9. res = strings.TrimSpace(res)
  10. return res
  11. }