original_string: public function get_short_filename($str, $maxlength) {
          if (core_text::strlen($str) >= $maxlength) {
              return trim(core_text::substr($str, 0, $maxlength)).'...';
          } else {
              return $str;
          }
      }
code: public function get_short_filename($str, $maxlength) {
          if (core_text::strlen($str) >= $maxlength) {
              return trim(core_text::substr($str, 0, $maxlength)).'...';
          } else {
              return $str;
          }
      }
code_tokens: public function get_short_filename ( $ str , $ maxlength ) { if ( core_text :: strlen ( $ str ) >= $ maxlength ) { return trim ( core_text :: substr ( $ str , 0 , $ maxlength ) ) . '...' ; } else { return $ str ; } }
docstring: Create a shorten filename
  
  @param string $str filename
  @param int $maxlength max file name length
  @return string short filename
docstring_tokens: Create a shorten filename