[][src]Function voca_rs::manipulate::word_wrap

pub fn word_wrap(
    subject: &str,
    width: usize,
    newline: &str,
    indent: &str
) -> String

Wraps subject to a given number of characters using a string break character.

Arguments

Example

use voca_rs::*;
manipulate::word_wrap("Hello world", 5, "", "");
// => "Hello\nworld"
manipulate::word_wrap("Hello world", 5, "<br/>", "__");
// => "__Hello<br/>__world"
use voca_rs::Voca;
"Hello world"._word_wrap(5, "", "");
// => "Hello\nworld"