Skip to content

zbysir/textwrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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