Java String Split splitArray(String[] srcArr, int start, int end)

Here you can find the source of splitArray(String[] srcArr, int start, int end)

Description

split Array

License

Open Source License

Declaration

public static String[] splitArray(String[] srcArr, int start, int end) 

Method Source Code


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

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static String[] splitArray(String[] srcArr, int start, int end) {
        List<Object> result = new ArrayList<Object>();
        if (start < 0) {
            throw new ArrayIndexOutOfBoundsException();
        }/*from   w w w  .  j ava2  s  . c  o m*/
        end = end > srcArr.length ? srcArr.length : end;
        for (int i = start; i < end; i++) {
            result.add(srcArr[i]);
        }

        return result.toArray(new String[0]);
    }
}

Related

  1. splitArguments(String s)
  2. splitArguments(String str)
  3. splitArguments(String string)
  4. splitArguments(String string)
  5. splitArray(byte[] src, int size)
  6. splitAt(final String input, final String seperator)
  7. splitAtLastBlank(String s, int width)
  8. splitAttributes(final String dname)
  9. splitAuthors(String source)