public function testTrim() { $this->eq(s::trim(' a '), 'a'); $this->eq(s::trim("\n\ta "), 'a'); $this->eq(s::trim(' a'), 'a'); $this->eq(s::trim('a '), 'a'); $this->eq(s::trim('a'), 'a'); $this->eq(s::trim(' a a '), 'a a'); $this->eq(s::trim(''), ''); $this->eq(s::trim('abcxyzcba', 'abc'), 'xyz'); }
public function trim($chars = null) { return new self(s::trim($this->value, self::unwrap($chars))); }