text.truncate Shorten text to a maximum length on a word boundary and add an ellipsis, counting Unicode code points. truncate in Rust texttruncateellipsisshorten 1.0.0py rs ts18 tests