[][src]Function voca_rs::manipulate::zfill

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

Pads subject from left with zeros to a new length.

Arguments

Example

use voca_rs::*;
manipulate::zfill("123", 5);
// => "00123"
manipulate::zfill("Café", 7);
// => "000Café"
use voca_rs::Voca;
"123"._zfill(5);
// => "00123"