public static String rightPad(String str, int size) {
        return rightPad(str, size, ' ');
    }
<p>Right pad a String with spaces (' ').</p>

<p>The String is padded to the size of {@code size}.</p>

<pre>
StringUtils.rightPad(null, *)   = null
StringUtils.rightPad("", 3)     = "   "
StringUtils.rightPad("bat", 3)  = "bat"
StringUtils.rightPad("bat", 5)  = "bat  "
StringUtils.rightPad("bat", 1)  = "bat"
StringUtils.rightPad("bat", -1) = "bat"
</pre>

@param str  the String to pad out, may be null
@param size  the size to pad to
@return right padded String or original String if no padding is necessary,
 {@code null} if null String input
android/android_framework/base/src/main/java/lang3/StringUtils.java