original_string: public static function createSlug($string)
  	{
  		// remove all accent characters
  		$string = self::remove_accents($string);
  
  		// lowercase
  		$string = strtolower($string);
  
  		// replace all characters except letters and numbers to dashes
  		$slug = preg_replace('/[^A-Za-z0-9-]+/', '-', $string);
  
  		// deep replace double dashes
  		while(strpos('--', $slug))
  		{
  			$slug = str_replace('--', '-', $slug);
  		}
  
  		// trim dashes at start and end
  		$slug = trim($slug, '-');
  
  		return $slug;
  	}
code: public static function createSlug($string)
  	{
  		// remove all accent characters
  		$string = self::remove_accents($string);
  
  		// lowercase
  		$string = strtolower($string);
  
  		// replace all characters except letters and numbers to dashes
  		$slug = preg_replace('/[^A-Za-z0-9-]+/', '-', $string);
  
  		// deep replace double dashes
  		while(strpos('--', $slug))
  		{
  			$slug = str_replace('--', '-', $slug);
  		}
  
  		// trim dashes at start and end
  		$slug = trim($slug, '-');
  
  		return $slug;
  	}
code_tokens: public static function createSlug ( $ string ) { // remove all accent characters $ string = self :: remove_accents ( $ string ) ; // lowercase $ string = strtolower ( $ string ) ; // replace all characters except letters and numbers to dashes $ slug = preg_replace ( '/[^A-Za-z0-9-]+/' , '-' , $ string ) ; // deep replace double dashes while ( strpos ( '--' , $ slug ) ) { $ slug = str_replace ( '--' , '-' , $ slug ) ; } // trim dashes at start and end $ slug = trim ( $ slug , '-' ) ; return $ slug ; }
docstring: Creates slug from any string
  
  @param  string $string
  
  @return string
docstring_tokens: Creates slug from any string