Create a {@code rpad(in, length)} expression

<p>Returns in right-padded to length characters</p>

@param in string to be padded
@param length target length
@return rpad(in, length)
168411
public static StringExpression rpad(Expression<String> in, Expression<Integer> length) {
        return Expressions.stringOperation(Ops.StringOps.RPAD, in, length);
    }
827219
public static function padRight(
        $string,
        $length = 0,
        $substring = ' ',
        $encoding = null
    ) {
        $encoding = $encoding === null ? mb_internal_encoding() : $encoding;

        return static::doPad($string, 0, $length - Mbstring::strlen($string, $encoding), $substring, $encoding);
    }
156447
public static String pad(String str, int totalChars) {
    if (str == null) {
      str = "null";
    }
    int slen = str.length();
    StringBuilder sb = new StringBuilder(str);
    for (int i = 0; i < totalChars - slen; i++) {
      sb.append(' ');
    }
    return sb.toString();
  }
1089940
public String createPatternString(String pattern, int length) {
        if (pattern == null) {
            return null;
        }

        int totalLength = pattern.length() * length;
        StringBuffer sb = new StringBuffer(totalLength);
        for (int i = 0; i < length; i++) {
            sb.append(pattern);
        }
        return sb.toString();
    }
11395
public static function pad(
        $string,
        $length = 0,
        $substring = ' ',
        $encoding = null
    ) {
        $encoding = $encoding === null ? mb_internal_encoding() : $encoding;
        $strLength = Mbstring::strlen($string, $encoding);
        $padding = $length - $strLength;

        return static::doPad($string, (int) floor($padding / 2), (int) ceil($padding / 2), $substring, $encoding);
    }
1022726
public static String toHexStringPadded(byte[] src, int offset, int length) {
        return toHexStringPadded(new StringBuilder(length << 1), src, offset, length).toString();
    }
594171
@Override
    protected InfixExpression createCorrectOddnessCheck(ASTRewrite rewrite, Expression numberExpression) {
        Assert.isNotNull(rewrite);
        Assert.isNotNull(numberExpression);

        final AST ast = rewrite.getAST();
        InfixExpression correctOddnessCheck = ast.newInfixExpression();
        InfixExpression remainderExp = ast.newInfixExpression();

        correctOddnessCheck.setLeftOperand(remainderExp);
        correctOddnessCheck.setOperator(NOT_EQUALS);
        correctOddnessCheck.setRightOperand(ast.newNumberLiteral("0"));

        remainderExp.setLeftOperand((Expression) rewrite.createMoveTarget(numberExpression));
        remainderExp.setOperator(REMAINDER);
        remainderExp.setRightOperand(ast.newNumberLiteral("2"));

        return correctOddnessCheck;
    }
1288165
function pad (num, padLen) {
  var padding = '0000';
  num = String(num);
  return padding.substring(0, padLen - num.length) + num;
}
650183
function createPadding (width) {
  var result = ''
  var string = ' '
  var n = width
  do {
    if (n % 2) {
      result += string;
    }
    n = Math.floor(n / 2);
    string += string;
  } while (n);

  return result;
}
787397
public Expression<String> in(String[] value) {
		String listString = "";
		Boolean firstString = true;
		for (String v : value) {
			if (firstString) {
				listString = listString.concat("('").concat(v).concat("'");
				firstString = false;
			} else {
				listString = listString.concat(", '").concat(v).concat("'");
			}
		}
		listString = listString.concat(")");
		return new Expression<String>(this, Operation.in, listString);
	}
502697
final static public void spacePad(StringBuilder sbuf, int length) {
        while (length >= 32) {
            sbuf.append(SPACES[5]);
            length -= 32;
        }

        for (int i = 4; i >= 0; i--) {
            if ((length & (1 << i)) != 0) {
                sbuf.append(SPACES[i]);
            }
        }
    }
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
351429
def _pad(string, size):
    
    strlen = len(string)
    if strlen == size:
        return string
    if strlen < size:
        return _padding[0:size-strlen] + string
    return string[-size:]
138709
private static function doPad(
        $string,
        $left,
        $right,
        $substring,
        $encoding = null
    ) {
        $strLength = Mbstring::strlen($string, $encoding);
        $padLength = Mbstring::strlen($substring, $encoding);
        $paddedLength = $strLength + $left + $right;

        if (!$padLength || $paddedLength <= $strLength) {
            return $string;
        }

        $leftStr = Mbstring::substr(str_repeat($substring, (int) ceil($left / $padLength)), 0, $left, $encoding);
        $rightStr = Mbstring::substr(str_repeat($substring, (int) ceil($right / $padLength)), 0, $right, $encoding);

        return $leftStr . $string . $rightStr;
    }
782319
@Deprecated
    final static public void spacePad(StringBuffer sbuf, int length) {
        while (length >= 32) {
            sbuf.append(SPACES[5]);
            length -= 32;
        }

        for (int i = 4; i >= 0; i--) {
            if ((length & (1 << i)) != 0) {
                sbuf.append(SPACES[i]);
            }
        }
    }
542591
public static Expression rtrim(String expression, String characters) {
        return rtrim(x(expression), characters);
    }
459363
public static String padleft(String s, int len, char c) {
        s = s.trim();
        if (s.length() > len) {
            return s;
        }
        final StringBuilder sb = new StringBuilder(len);
        int fill = len - s.length();
        while (fill-- > 0) {
            sb.append(c);
        }
        sb.append(s);
        return sb.toString();
    }