So one of the problems I have to solve writing my #golang #TUI library #Tooey was formatting text within a drawable area. I ended up writing #rslice which is another library specifically for manipulating []rune and dealing with whitespace, directional justification, and even producing a "full" justification style by normalizing whitespace across a []rune.
The library can be found here with MIT License:
https://github.com/asciifaceman/rslice
Docs:
#golang #tui #tooey #rslice #programming #foss #oss