Java String Sub String subStringArray(String in[], int start, int end)

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

Description

Return a subset of an array.

License

Open Source License

Parameter

Parameter Description
in a parameter
start a parameter
end a parameter

Declaration

public static String[] subStringArray(String in[], int start, int end) 

Method Source Code

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

public class Main {
    /**/*from  w  w w.j  a  va 2 s.  c  om*/
     * Return a subset of an array.
     * 
     * @param in
     * @param start
     * @param end
     * @return
     */
    public static String[] subStringArray(String in[], int start, int end) {
        String[] ret = new String[end - start];
        int j = 0;
        for (int i = start; i < end; i++) {
            ret[j++] = in[i];
        }
        return ret;
    }
}

Related

  1. substringAfterLast(String string, String delimiter)
  2. substringAfterLast(String text, char after)
  3. subStringAfterLastSymbol(String inStr, char symbol)
  4. substringAfterReturnAll(String str, String before)
  5. substringAndchopLastNewline(String text, int start_pos, int end_pos)
  6. substringBaseName(String baseName, int extraCharsNumber)
  7. substringBefore(final String str, final String separator)
  8. substringBefore(final String string, final String separator)
  9. substringBefore(String input, String sub)