code: function string (str, index){
      var str = String(typeof str == 'object' && str.text ? str.text : str)
        , length = utils.strlen(str)
        , width = colWidths[index]
            - (style['padding-left'] || 0)
            - (style['padding-right'] || 0)
        , align = options.colAligns[index] || 'left';
  
      return repeat(' ', style['padding-left'] || 0)
           + (length == width ? str :
               (length < width
                ? pad(str, ( width + (str.length - length) ), ' ', align == 'left' ? 'right' :
                    (align == 'middle' ? 'both' : 'left'))
                : (truncater ? truncate(str, width, truncater) : str))
             )
           + repeat(' ', style['padding-right'] || 0);
    }
docs: renders a string, by padding it or truncating it