original_string: public static function slug($string, $replacement = '-')
      {
          $transliterated = static::transliterate($string);
          $spaced = preg_replace('/[^\w\s]/', ' ', $transliterated);
          return preg_replace('/\\s+/', $replacement, trim($spaced));
      }
code: public static function slug($string, $replacement = '-')
      {
          $transliterated = static::transliterate($string);
          $spaced = preg_replace('/[^\w\s]/', ' ', $transliterated);
          return preg_replace('/\\s+/', $replacement, trim($spaced));
      }
code_tokens: public static function slug ( $ string , $ replacement = '-' ) { $ transliterated = static :: transliterate ( $ string ) ; $ spaced = preg_replace ( '/[^\w\s]/' , ' ' , $ transliterated ) ; return preg_replace ( '/\\s+/' , $ replacement , trim ( $ spaced ) ) ; }
docstring: Returns a string with all spaces converted to given replacement and non word characters removed.
  Maps special characters to ASCII using `transliterator_transliterate`.
  
  @param  string $string      An arbitrary string to convert.
  @param  string $replacement The replacement to use for spaces.
  @return string              The converted string.
docstring_tokens: Returns a string with all spaces converted to given replacement and non word characters removed . Maps special characters to ASCII using transliterator_transliterate .