array_tool::string

Trait Squeeze

Source
pub trait Squeeze {
    // Required method
    fn squeeze(&self, targets: &'static str) -> String;
}
Expand description

Squeeze - squeezes duplicate characters down to one each

Required Methods§

Source

fn squeeze(&self, targets: &'static str) -> String

§Example
use array_tool::string::Squeeze;

"yellow moon".squeeze("");
§Output
"yelow mon"

Implementations on Foreign Types§

Source§

impl Squeeze for str

Source§

fn squeeze(&self, targets: &'static str) -> String

Implementors§