You are here

function dba_statpack_center in Database Administration 7

Center text like standard statpack output.

2 calls to dba_statpack_center()
dba_mysql_statpack_output in database/mysql.statpack.inc
dba_statpack_header in ./dba.statpack.inc
Display report header.

File

./dba.statpack.inc, line 137

Code

function dba_statpack_center($text, $length = 100) {
  $space = ($length - strlen($text)) / 2;
  return str_repeat(' ', $space) . $text;
}