class Chr {

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

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

        int delta = size - in.length;
        int index = 0;
        char[] newArray = new char[ size ];


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


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

        return newArray;
    }

}