function fillBlanks(text, pad) {
    "use strict";
    pad = pad || 80;
    if (text.length < pad) {
        text += new Array(pad - text.length + 1).join(' ');
    }
    return text;
}
Takes a string and append blanks until the pad value is reached.

@param  String  text
@param  Number  pad   Pad value (optional; default: 80)
@return String