Text wrap algorithms like css 'overflow-wrap: break-word;'
- Wrap text without breaking words as much as possible
- Support Chinese characters and super long words
go get github.com/zbysir/textwrap
textwrap.TextWrap("text", func(s string) bool {
return len(s) > 10
})
- Does not follow the "Unicode line breaking algorithm"