~handlerug/handlebot

ref: 5c3342e9f8fd6f47e7bc4ff496b631441fce047a handlebot/utils.go -rw-r--r-- 130 bytes
5c3342e9Umar Getagazov Update README.md 3 months ago
                                                                                
1
2
3
4
5
6
7
8
package main

func ellipsize(text string, max int) string {
	if len(text) > max {
		return text[:max-3] + "..."
	}
	return text
}