original_string: private function truncate($text, $length, $suffix = '...')
      {
          $computedLength = $length - strlen($suffix);
  
          return strlen($text) > $computedLength ? substr($text, 0, $computedLength) . $suffix : $text;
      }
code: private function truncate($text, $length, $suffix = '...')
      {
          $computedLength = $length - strlen($suffix);
  
          return strlen($text) > $computedLength ? substr($text, 0, $computedLength) . $suffix : $text;
      }
code_tokens: private function truncate ( $ text , $ length , $ suffix = '...' ) { $ computedLength = $ length - strlen ( $ suffix ) ; return strlen ( $ text ) > $ computedLength ? substr ( $ text , 0 , $ computedLength ) . $ suffix : $ text ; }
docstring: Truncate the given string.
  
  See: https://github.com/symfony/symfony/issues/11977
  
  @param string $text Text to truncate
  @param int $length Length
  @param string $suffix Suffix to append
  
  @return string
docstring_tokens: Truncate the given string .