Function textwrap::fill
[−]
[src]
pub fn fill(s: &str, width: usize) -> String
Fill a line of text at width
bytes.
The result is a string with newlines between each line. Use wrap
if you need access to the individual lines.
use textwrap::fill; assert_eq!(fill("Memory safety without garbage collection.", 15), "Memory safety\nwithout garbage\ncollection.");