zbysir / textwrap

Better text wrap algorithms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Textwrap

Text wrap algorithms like css 'overflow-wrap: break-word;'

overflow-wrap: break-word

  • Wrap text without breaking words as much as possible
  • Support Chinese characters and super long words

Usage

go get github.com/zbysir/textwrap
textwrap.TextWrap("text", func(s string) bool {
		return len(s) > 10
})

Known problems

About

Better text wrap algorithms

License:Apache License 2.0


Languages

Language:Go 100.0%