go-jamming/common/strings.go

9 lines
116 B
Go

package common
func Shorten(txt string) string {
if len(txt) <= 250 {
return txt
}
return txt[:250] + "..."
}