[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

spenserblack/go-wordwrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wordwrap

CI codecov Go Report Card Go Reference

Wraps words at a given limit. Wraps at whitespace, hyphens (-), and will wrap words that exceed the given limit. See package documentation for more details.

Example

lines := wordwrap.WordWrap("this test-string has been successfully wrapped successfully", 10)
for _, line := range lines {
	fmt.Println(line)
}

Output

this test-
string has
been
successful
ly wrapped
successful
ly