original_string: function format_title($title,$max=64) {
  
          if (core_text::strlen($title) <= $max) {
              return $title;
          } else {
              return core_text::substr($title, 0, $max - 3) . '...';
          }
      }
code: function format_title($title,$max=64) {
  
          if (core_text::strlen($title) <= $max) {
              return $title;
          } else {
              return core_text::substr($title, 0, $max - 3) . '...';
          }
      }
code_tokens: function format_title ( $ title , $ max = 64 ) { if ( core_text :: strlen ( $ title ) <= $ max ) { return $ title ; } else { return core_text :: substr ( $ title , 0 , $ max - 3 ) . '...' ; } }
docstring: Strips a large title to size and adds ... if title too long
  This function does not escape HTML entities, so they have to be escaped
  before being passed here.
  
  @param string title to shorten
  @param int max character length of title
  @return string title shortened if necessary
docstring_tokens: Strips a large title to size and adds ... if title too long This function does not escape HTML entities so they have to be escaped before being passed here .