class Chr {

    public static char[] rpad( final char[] in, final int size, char pad ) {

        if ( in.length >= size ) {
            return in;
        }

        int index = 0;
        char[] newArray = new char[ size ];

        for ( index = 0; index < in.length; index++ ) {
            newArray[ index ] = in[ index ];
        }


        for (; index < size; index++ ) {
            newArray[ index ] = pad;
        }

        return newArray;
    }

}