SplitAndTrim slices s into all subslices separated by sep and returns a slice of the string s with all leading and trailing Unicode code points contained in cutset removed. If sep is empty, SplitAndTrim splits after each UTF-8 sequence. First part is equivalent to strings.SplitN with a count of -1.
(s, sep, cutset string)
| 44 | // UTF-8 sequence. First part is equivalent to strings.SplitN with a count of |
| 45 | // -1. |
| 46 | func SplitAndTrim(s, sep, cutset string) []string { |
| 47 | if s == "" { |
| 48 | return []string{} |
| 49 | } |
| 50 | |
| 51 | spl := strings.Split(s, sep) |
| 52 | for i := 0; i < len(spl); i++ { |
| 53 | spl[i] = strings.Trim(spl[i], cutset) |
| 54 | } |
| 55 | return spl |
| 56 | } |
| 57 | |
| 58 | // Returns true if s is a non-empty printable non-tab ascii character. |
| 59 | func IsASCIIText(s string) bool { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…