src/ADT/String.php
public function repeat( $multiplier )
	{
		if( !is_int( $multiplier ) )
			throw new InvalidArgumentException( 'Multiplier must be integer' );
		if( $multiplier < 0 )
			throw new InvalidArgumentException( 'Multiplier must be atleast 0' );
		$length			= $this->getLength();
		$this->string	= str_repeat( $this->string, $multiplier + 1 );
		return $this->getLength() - $length;
	}
public function repeat( $multiplier )
	{
		if( !is_int( $multiplier ) )
			throw new InvalidArgumentException( 'Multiplier must be integer' );
		if( $multiplier < 0 )
			throw new InvalidArgumentException( 'Multiplier must be atleast 0' );
		$length			= $this->getLength();
		$this->string	= str_repeat( $this->string, $multiplier + 1 );
		return $this->getLength() - $length;
	}
public function repeat ( $ multiplier ) { if ( ! is_int ( $ multiplier ) ) throw new InvalidArgumentException ( 'Multiplier must be integer' ) ; if ( $ multiplier < 0 ) throw new InvalidArgumentException ( 'Multiplier must be atleast 0' ) ; $ length = $ this -> getLength ( ) ; $ this -> string = str_repeat ( $ this -> string , $ multiplier + 1 ) ; return $ this -> getLength ( ) - $ length ; }
Repeats this string.
If the multiplier is 1 the string will be doubled.
If the multiplier is 0 there will be no effect.
Negative multipliers are not allowed.
@access		public
@param		int			$multiplier
@return		int			Number of added characters
Repeats this string . If the multiplier is 1 the string will be doubled . If the multiplier is 0 there will be no effect . Negative multipliers are not allowed .