[][src]Function voca_rs::manipulate::pad

pub fn pad(subject: &str, length: usize, pad: &str) -> String

Pads subject to a new length.

Arguments

Example

use voca_rs::*;
manipulate::pad("dog", 5, "");
// => " dog "
manipulate::pad("bird", 6, "-");
// => "-bird-"
manipulate::pad("Café del Mar", 15, "-=");
// => "-Café del Mar-="
use voca_rs::Voca;
"dog"._pad(5, "");
// => " dog "