RemoveExcessiveWhitespace returns a copy of the string s with excessive whitespace removed.
(s string)
| 28 | |
| 29 | // RemoveExcessiveWhitespace returns a copy of the string s with excessive whitespace removed. |
| 30 | func RemoveExcessiveWhitespace(s string) string { |
| 31 | return whitespaceRE.ReplaceAllString(strings.TrimSpace(s), " ") |
| 32 | } |
| 33 | |
| 34 | func DisplayWidth(s string) int { |
| 35 | return text.DisplayWidth(s) |
no outgoing calls