[][src]Function voca_rs::manipulate::pad_left

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

Pads subject from left to a new length.

Arguments

Example

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