Java Array Copy arrayCopy(String[][] src, int src_position, String[][] dst, int dst_position, int length)

Here you can find the source of arrayCopy(String[][] src, int src_position, String[][] dst, int dst_position, int length)

Description

array Copy

License

Open Source License

Declaration

public static void arrayCopy(String[][] src, int src_position, String[][] dst, int dst_position, int length) 

Method Source Code

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

public class Main {

    public static void arrayCopy(String[][] src, int src_position, String[][] dst, int dst_position, int length) {
        System.arraycopy(src, src_position, dst, dst_position, length);
        for (int i = src_position; i < src_position + length; i++) {
            String[] tem = new String[src[i].length];
            System.arraycopy(src[i], 0, tem, 0, tem.length);
            src[i] = tem;/*www.ja  va  2 s.c  o  m*/
        }
    }

    public static String[][] arrayCopy(String[][] src, int src_position, int length) {
        String[][] dst = new String[length][];
        arrayCopy(src, src_position, dst, 0, length);
        return dst;
    }

    public static String[][] arrayCopy(String[][] src) {
        return arrayCopy(src, 0, src.length);
    }
}

Related

  1. arrayCopy(Object src, int srcPos, Object dest, int destPos, int length)
  2. arraycopy(Object src, int srcPos, Object dest, int destPos, int length)
  3. arrayCopy(Object[] source, Object[] target, int size)
  4. arraycopy(Object[] src, int srcPos, Object[] dest, int destPos, int length)
  5. arraycopy(String[] src)
  6. arraycopy(T[] a)
  7. arrayCopy(T[] objs)
  8. arraycopy(T[] src, int srcPos, T[] dest, int destPos, int length)
  9. arraycopy(T[] src, int srcPos, T[] dst, int len)