Java String Chop chop(String[] arr, int pos)

Here you can find the source of chop(String[] arr, int pos)

Description

chop

License

Apache License

Declaration

public static String[] chop(String[] arr, int pos) 

Method Source Code

//package com.java2s;
/*//from   w  ww  . java 2 s .  c o m
Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable
    
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    
   http://www.apache.org/licenses/LICENSE-2.0
    
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    
See the License for the specific language governing permissions and
limitations under the License.
*/

public class Main {
    public static String[] chop(String[] arr, int pos) {
        String[] res = new String[arr.length - pos];
        for (int i = 0; i < arr.length - pos; i++) {
            res[i] = arr[pos + i];
        }
        return res;
    }
}

Related

  1. chop(String str, int maxLength)
  2. chop(String string, int length)
  3. chop(String string, int length)
  4. chop(String value, int size)
  5. chop(String x)
  6. chop(StringBuffer buffer, int chars)
  7. chopAccelerator(final String title)
  8. ChopAllLf(String this_string, String chomp_off)
  9. ChopAllRt(String this_string, String chomp_off)