code: public static function title($title, $pad = '=')
      {
          $rest = (int) (78 - mb_strlen($title)) / 2;
  
          $result = "\n\n";
          $result .= str_repeat($pad, $rest);
          $result .= ' ' . $title . ' ';
          $result .= str_repeat($pad, $rest);
          $result .= "\n\n";
          return $result;
      }
docs: Titleizes a string
  
  @param string $title The string to titleize.