Trait pad::PadStr [] [src]

pub trait PadStr {
    fn pad(
        &self,
        width: usize,
        pad_char: char,
        alignment: Alignment,
        truncate: bool
    ) -> String; fn pad_to_width(&self, width: usize) -> String { ... }
fn pad_to_width_with_char(&self, width: usize, pad_char: char) -> String { ... }
fn pad_to_width_with_alignment(
        &self,
        width: usize,
        alignment: Alignment
    ) -> String { ... }
fn with_exact_width(&self, width: usize) -> String { ... } }

Functions to do with string padding.

Required Methods

Pad a string to the given width somehow.

Provided Methods

Pad a string to be at least the given width by adding spaces on the right.

Pad a string to be at least the given width by adding the given character on the right.

Pad a string to be at least the given with by adding spaces around it.

Pad a string to be exactly the given width by either adding spaces on the right, or by truncating it to that width.

Implementations on Foreign Types

impl PadStr for str
[src]

[src]

[src]

[src]

[src]

[src]

Implementors