Create an abbreviate
function which can shorten text to a specific width
#513
Labels
abbreviate
function which can shorten text to a specific width
#513
We have all the infrastructure (and dependencies) needed to add a small
abbreviate
ortruncate
function which will shorten text to a specific width.The most forward way is wrong in Rust: returning
&s[..width]
is prone to panicking since you can end up slicing into a Unicode character.The text was updated successfully, but these errors were encountered: