src/ADT/String.php
public function trim( $left = TRUE, $right = TRUE )
	{
		$length			= $this->getLength();
		if( $left && $right )
			$this->string	= trim( $this->string );
		else if( $left )
			$this->string	= ltrim( $this->string );
		else if( $right )
			$this->string	= rtrim( $this->string );
		return $length - $this->getLength();
	}
public function trim( $left = TRUE, $right = TRUE )
	{
		$length			= $this->getLength();
		if( $left && $right )
			$this->string	= trim( $this->string );
		else if( $left )
			$this->string	= ltrim( $this->string );
		else if( $right )
			$this->string	= rtrim( $this->string );
		return $length - $this->getLength();
	}
public function trim ( $ left = TRUE , $ right = TRUE ) { $ length = $ this -> getLength ( ) ; if ( $ left && $ right ) $ this -> string = trim ( $ this -> string ) ; else if ( $ left ) $ this -> string = ltrim ( $ this -> string ) ; else if ( $ right ) $ this -> string = rtrim ( $ this -> string ) ; return $ length - $ this -> getLength ( ) ; }
Trims this String and returns number of removed characters.
@access		public
@param		bool		$left			Remove from left side
@param		bool		$right			Remove from right side
@return		int			Number of removed characters
Trims this String and returns number of removed characters .