public function trim(array $chars = null){
		
		if($chars === null){
			return new static(\trim($this->_Value), $this->_Encoding);
		}
	
		$chars = \preg_quote(\implode(static::NONE, $chars));
		
		$str = \preg_replace(
				\sprintf('/(^[%s]+)|([%s]+$)/us', $chars, $chars),
				static::NONE,
				$this->_Value);
		
		return new static($str, $this->_Encoding);
			
	}
public function trim(array $chars = null){
		
		if($chars === null){
			return new static(\trim($this->_Value), $this->_Encoding);
		}
	
		$chars = \preg_quote(\implode(static::NONE, $chars));
		
		$str = \preg_replace(
				\sprintf('/(^[%s]+)|([%s]+$)/us', $chars, $chars),
				static::NONE,
				$this->_Value);
		
		return new static($str, $this->_Encoding);
			
	}
public function trim ( array $ chars = null ) { if ( $ chars === null ) { return new static ( \ trim ( $ this -> _Value ) , $ this -> _Encoding ) ; } $ chars = \ preg_quote ( \ implode ( static :: NONE , $ chars ) ) ; $ str = \ preg_replace ( \ sprintf ( '/(^[%s]+)|([%s]+$)/us' , $ chars , $ chars ) , static :: NONE , $ this -> _Value ) ; return new static ( $ str , $ this -> _Encoding ) ; }
Trims whitespace or a set of characters from both ends of this string
@param array $chars optional
@return \static
Trims whitespace or a set of characters from both ends of this string