Should lpad/rpad be defined in terms of textwidth instead of code units or have the option to do so? #38256
Labels
Comments
|
I have seen functions like Does someone know the usecase for using |
|
Triage said |
|
From triage: we can't think of a use case where you would want |
|
Hey, |
|
Go for it! |
|
@rohanxyzg, Just a heads up since you post this in a few "good first issue" posts, there is generally no need to "claim" an issue, you can just start working on it and submit a PR when it is finished :). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One of the main use cases of
lpadandrpadis, at least for me personally, to align things in the terminal. However,lpadandrpadare defined (and documented) to work in terms of code units (i.e. they calllengthon the input string) which means that whenlengthandtextwidthdisagree, you get unaligned output:This can cause bugs like KristofferC/TimerOutputs.jl#94.
Two points of discussions:
textwidthinstead oflength? Perhaps too much of a breaking change.textwidth, e.g. with a kwarg?The text was updated successfully, but these errors were encountered: