lipgloss
lipgloss copied to clipboard
feat: add Widest for returning the widest member of a string slice
An additional utility function. Not totally sure if this should be merged yet, but I find myself doing this a lot.
I think this should probably go in charmbracelet/x.
@aymanbagabas What do you think about making an ANSI-aware function of this in x/term? I also found myself needing this at some points.
@aymanbagabas What do you think about making an ANSI-aware function of this in
x/term? I also found myself needing this at some points.
Hey @maaslalani, this PR updates the Width method to use ansi.StringWidth to calculate the width. However I still think something like lipgloss.Widest is still beneficial.