Right pad the given string
320338
public static String rightPad( String value , int size , char padChar )
    {
        if (value.length() >= size)
            return value;
        
        StringBuilder result = new StringBuilder(size);
        result.append(value);
        for (int n = 0 ; n < size-value.length() ; n++)
            result.append(padChar);        
        return result.toString();
    }
941243
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);
  });
}
152313
function leftPad(value, length) {
  const total = !length ? 0 : length;

  let padded = value + '';

  while (padded.length < total) {
    padded = '0' + padded;
  }

  return padded;
}
1300989
def pad(self, string):
        
        size = len(string)
        target = size * (4.75 - size ** 0.27)
        pad_len = int(target) - size
        return string + self.LOREM[:pad_len] + "#"
1069220
public static String rightTrim(final String value) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        return value.replaceAll("\\s+$", "");
    }
79751
function pad(obj, width)
{
	var objstr, rv, i;

	if (obj === undefined)
		objstr = '';
	else
		objstr = obj.toString();

	rv = '';

	if (typeof (obj) != 'number')
		rv += objstr;

	for (i = objstr.length; i < width; i++)
		rv += ' ';

	if (typeof (obj) == 'number')
		rv += objstr;

	return (rv);
}
363177
function padString(str, len) {
  return str.split().concat(new Array(len-str.length)).join(' ');
}
406184
function pad(str, length, char) {
	return new BespokeString(str).pad(length, char).toString()
}
1017620
def pad_version(left, right):
    """"""
    pair = vcmp(left), vcmp(right)

    mn, mx = min(pair, key=len), max(pair, key=len)

    for idx, c in enumerate(mx):

        try:
            a = mx[idx]
            b = mn[idx]
            if type(a) != type(b):
                mn.insert(idx, 0)
        except IndexError:
            if type(c) is int:
                mn.append(0)
            elif isinstance(c, six.string_types):
                mn.append('')
            else:
                raise Exception("pad_version failed (%s) (%s)" % (left, right))

    return pair
1288165
function pad (num, padLen) {
  var padding = '0000';
  num = String(num);
  return padding.substring(0, padLen - num.length) + num;
}
314683
function padRight(x, padding) {
  if (x) {
    x += '';
  } else {
    x = '';
  }
  var buf = [];
  while (buf.length + x.length < padding) {
    buf.push('0');
  }
  return x + buf.join('');
}
198832
def _pad_string(self, str, colwidth):
        """"""
        width = self._disp_width(str)
        prefix = (colwidth - 1 - width) // 2
        suffix = colwidth - prefix - width
        return ' ' * prefix + str + ' ' * suffix
122233
public static String pad(String s, int length)
  {
    if (s.length() < length)
    {
      StringBuffer a = new StringBuffer(length);
      a.append(s);
      for (int i = s.length(); i < length; i++)
      {
        a = a.append(" ");
      }
      return a.toString();
    }
    else if (s.length() > length)
    {
      return s.substring(0, length);
    }
    else
    {
      return s;
    }
  }
1150250
public static int rightTrimSize(String s) {

        int i = s.length();

        while (i > 0) {
            i--;

            if (s.charAt(i) != ' ') {
                return i + 1;
            }
        }

        return 0;
    }
366628
protected static String justifyRight(CharSequence csq, char pad, int width) {
        try {
            StringBuilder sb = new StringBuilder(width);
            justifyRight(sb, csq, pad, width);
            return sb.toString();
        } catch (IOException e) {
            throw new AssertionError("StringBuilder failed", e);
        }
    }
441327
function pad (content, length) {
    content = content || ''

    while (content.length < length) {
      content = content + ' '
    }

    return content
  }
147310
def right(ctx, text, num_chars):
    
    num_chars = conversions.to_integer(num_chars, ctx)
    if num_chars < 0:
        raise ValueError("Number of chars can't be negative")
    elif num_chars == 0:
        return ''
    else:
        return conversions.to_string(text, ctx)[-num_chars:]