[][src]Function voca_rs::manipulate::trim

pub fn trim(subject: &str, whitespace: &str) -> String

Removes whitespaces from left and right sides of the subject.

Arguments

Example

use voca_rs::*;
manipulate::trim(" Mother nature ", "");
// => "Mother nature"
manipulate::trim("-~-Earth~-~", "-~");
// => "Earth"
use voca_rs::Voca;
" Mother nature "._trim("");
// => "Mother nature"