Java Array Chomp chompArray(char[] array, int start, int end)

Here you can find the source of chompArray(char[] array, int start, int end)

Description

chomp Array

License

Open Source License

Declaration

public static char[] chompArray(char[] array, int start, int end) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static char[] chompArray(char[] array, int start, int end) {
        char[] newArray = new char[end - start];
        for (int i = 0, j = start; j < end; i++, j++) {
            newArray[i] = array[j];//  w  w  w .j av  a  2 s.c  om
        }

        return newArray;
    }
}

Related

  1. chomp(char[] charArray)