class Chr {

    public static char[] trim( char[] buffer, int start, int to ) {


        while ( ( start < to ) && (
                buffer[ start ] <= ' ' ) ) {
            start++;
        }
        while ( ( start < to ) && (
                buffer[ to - 1 ] <= ' ' ) ) {
            to--;
        }
        return ( ( start > 0 ) || ( to < buffer.length ) ) ?
                java.util.Arrays.copyOfRange( buffer, start, to ) : buffer;
    }

}