Java Array Shift shiftStringArray(String[] input)

Here you can find the source of shiftStringArray(String[] input)

Description

Remove the first entry in the String array

License

Open Source License

Declaration

private static String[] shiftStringArray(String[] input) 

Method Source Code

//package com.java2s;
/*************************************************************************
 *                                                                       *
 *  EJBCA Community: The OpenSource Certificate Authority                *
 *                                                                       *
 *  This software is free software; you can redistribute it and/or       *
 *  modify it under the terms of the GNU Lesser General Public           *
 *  License as published by the Free Software Foundation; either         *
 *  version 2.1 of the License, or any later version.                    *
 *                                                                       *
 *  See terms of license at gnu.org.                                     *
 *                                                                       *
 *************************************************************************/

public class Main {
    /**//  w  w w.  j  a v a 2  s.c  o  m
     * Remove the first entry in the String array
     */
    private static String[] shiftStringArray(String[] input) {
        String[] output = new String[input.length - 1];
        System.arraycopy(input, 1, output, 0, input.length - 1);
        return output;
    }
}

Related

  1. shiftRight2(T[] array, int to)
  2. shiftRightN(int[] block, int n)
  3. shiftRightN(int[] block, int n)
  4. shiftRightN(int[] x, int n)
  5. shiftRightState(int[] state)
  6. unshift(String[] array, String newElem)