Skip to main content

zfill

Function zfill 

Source
pub fn zfill<D: Dimension>(
    a: &StringArray<D>,
    width: usize,
) -> FerrayResult<StringArray<D>>
Expand description

Pad each string on the left with zeros to fill the given width.

If the string starts with a sign (+ or -), the sign is placed before the zeros. If the string is already longer than width, it is returned unchanged.

ยงErrors

Returns an error if the internal array construction fails.