jsdataframe.js
function rightAlign(strVec) {
  var maxWidth = strVec.nChar().max();
  var padding = jd.rep(' ', maxWidth).strJoin('');
  return strVec.map(function(str) {
    return (padding + str).slice(-padding.length);
  });
}
function rightAlign(strVec) {
  var maxWidth = strVec.nChar().max();
  var padding = jd.rep(' ', maxWidth).strJoin('');
  return strVec.map(function(str) {
    return (padding + str).slice(-padding.length);
  });
}
function rightAlign ( strVec ) { var maxWidth = strVec . nChar ( ) . max ( ) ; var padding = jd . rep ( ' ' , maxWidth ) . strJoin ( '' ) ; return strVec . map ( function ( str ) { return ( padding + str ) . slice ( - padding . length ) ; } ) ; }
Helper for right-aligning every element in a string vector, padding with spaces so all elements are the same width
Helper for right - aligning every element in a string vector padding with spaces so all elements are the same width