original_string: private static function truncateStr($str, $limit)
      {
          if (strlen($str) > $limit) {
              return substr($str, 0, $limit) . '...';
          }
          return $str;
      }
code: private static function truncateStr($str, $limit)
      {
          if (strlen($str) > $limit) {
              return substr($str, 0, $limit) . '...';
          }
          return $str;
      }
code_tokens: private static function truncateStr ( $ str , $ limit ) { if ( strlen ( $ str ) > $ limit ) { return substr ( $ str , 0 , $ limit ) . '...' ; } return $ str ; }
docstring: Utility function that truncates a string to an arbitrary limit.
  
  @param string $str The string to truncate.
  @param int $limit The maximum length of the truncated string.
  @return string
docstring_tokens: Utility function that truncates a string to an arbitrary limit .