[−][src]Macro textwrap_macros::wrap
Wrap a line of text at width characters.
Strings are wrapped based on their displayed width, not their size in bytes.
Usage
ⓘThis example is not tested
wrap!($text: lit &str, $width: lit usize) -> lit &[ lit &str ]
Example
use textwrap_macros::wrap; const LINES: &[&str] = wrap!("Concurrency without data races.", 15); assert_eq!(LINES, ["Concurrency", "without data", "races."]);