Format numbers with whitespaces

Adds needed amount of whitespaces to the left or right of the number.

php
fork add to bundle source
function tab_format($number, $width = 6, $left = true) { return str_pad($number, $width, " ", $left ? STR_PAD_LEFT : STR_PAD_RIGHT); }

usage

load_function('tab_whitespace'); echo 'Formatted: ' . tab_format(342); // Formatted: 342
← how to use this in app?
create log ...inout