RemoveComments removes the comments starting with # in the text.
(s string)
| 50 | |
| 51 | // RemoveComments removes the comments starting with # in the text. |
| 52 | func RemoveComments(s string) string { |
| 53 | pos := strings.Index(s, "#") |
| 54 | if pos == -1 { |
| 55 | return s |
| 56 | } |
| 57 | return strings.TrimSpace(s[0:pos]) |
| 58 | } |
| 59 | |
| 60 | // ArrayEquals determines whether two string arrays are identical. |
| 61 | func ArrayEquals(a []string, b []string) bool { |
no outgoing calls
searching dependent graphs…