str_trunc behaves unexpectedly when width is shorter than elipsis #163
Comments
I'd be happy to fix this in a PR (maybe add on to #165), but I'm unsure what the right behavior is; truncate the elipsis? e.g. > str_trunc("foobar", 2)
[1] ".." |
I think an error would be most appropriate. A PR would be great! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example
I'm not sure what should happen when
width < str_length(elipsis)
(warning? error? NA?), but making the string longer can't be right.Session Info
(not dev, but this function hasn't changed in awhile)
The text was updated successfully, but these errors were encountered: