asciifaceman / rslice

Golang rune slice ([]rune) operations
MIT License
0 stars 0 forks source link

rslice

test workflow Go Coverage Go Report Card Go Reference

Some operations for working with []rune thingies and stuff which may be particularly useful for things like justifying text, manipulating strings, or just being a dang hunk.

I mostly wrote this to lift it out of tooey

Some Example Usage


s := []rune("    TEST STRING")
s = ShiftWhiteSpaceRight(s)

> "TEST STRING     "

s := []rune("ABCDEF")
s = ShiftLeft(s)

> "BCDEFA"

See the library's tests for extensive example usages