original_string: public function generateSlug($title)
      {
          $title = strtolower($title);
          $title = preg_replace('/[^%a-z0-9 _-]/', '', $title);
          $title = preg_replace('/\s+/', '-', $title);
          $title = preg_replace('|-+|', '-', $title);
          $title = trim($title, '-');
  
          return $title;
      }
code: public function generateSlug($title)
      {
          $title = strtolower($title);
          $title = preg_replace('/[^%a-z0-9 _-]/', '', $title);
          $title = preg_replace('/\s+/', '-', $title);
          $title = preg_replace('|-+|', '-', $title);
          $title = trim($title, '-');
  
          return $title;
      }
code_tokens: public function generateSlug ( $ title ) { $ title = strtolower ( $ title ) ; $ title = preg_replace ( '/[^%a-z0-9 _-]/' , '' , $ title ) ; $ title = preg_replace ( '/\s+/' , '-' , $ title ) ; $ title = preg_replace ( '|-+|' , '-' , $ title ) ; $ title = trim ( $ title , '-' ) ; return $ title ; }
docstring: Generate an appropriate slug from a title
  This function will turn a title into a lowercase and hyphenated title that is compatible with how Sculpin expects
  slugs.
  
  @param string $title Raw title
  
  @return string
docstring_tokens: Generate an appropriate slug from a title This function will turn a title into a lowercase and hyphenated title that is compatible with how Sculpin expects slugs .