src/ADT/String.php
public function hyphenate( $characters = array( ' ' ), $hyphen = '-' ){
		$string	= $this->string;
		foreach( $characters as $character ){
			$pattern	= '/'.preg_quote( $character, '/' ).'+/s';
			$string		= preg_replace( $pattern, $hyphen, $string );
		}
		return $string;
	}
public function hyphenate( $characters = array( ' ' ), $hyphen = '-' ){
		$string	= $this->string;
		foreach( $characters as $character ){
			$pattern	= '/'.preg_quote( $character, '/' ).'+/s';
			$string		= preg_replace( $pattern, $hyphen, $string );
		}
		return $string;
	}
public function hyphenate ( $ characters = array ( ' ' ) , $ hyphen = '-' ) { $ string = $ this -> string ; foreach ( $ characters as $ character ) { $ pattern = '/' . preg_quote ( $ character , '/' ) . '+/s' ; $ string = preg_replace ( $ pattern , $ hyphen , $ string ) ; } return $ string ; }
Replaces whitespace by hyphen.
@access		public
@param		array		$characters		List of characters to replace by hyphen
@param		string		$hyphen			Hyphen character to replace given characters with
@return		bool		string
Replaces whitespace by hyphen .