(text string, limit int)
| 162 | } |
| 163 | |
| 164 | func truncateString(text string, limit int) string { |
| 165 | runes := []rune(text) |
| 166 | if len(runes) <= limit { |
| 167 | return text |
| 168 | } |
| 169 | return string(runes[:limit]) |
| 170 | } |
no outgoing calls
no test coverage detected