Android String Split getStringArray(String str)

Here you can find the source of getStringArray(String str)

Description

get String Array

Declaration

public static String[] getStringArray(String str) 

Method Source Code

//package com.java2s;

import java.util.List;

public class Main {

    public static String[] getStringArray(String str) {
        String[] strarr = new String[1];
        strarr[0] = str;//from w  ww.  ja v  a2s. c  o m
        return strarr;
    }

    public static String[] getStringArray(List list) {
        String[] strarr = new String[list.size()];
        if (list != null && list.size() > 0) {
            for (int i = 0; i < list.size(); i++) {
                strarr[i] = (String) list.get(i);
            }
        }
        return strarr;
    }
}

Related

  1. getFirstWord(String str)
  2. getLine(String text, int line)
  3. stringToLongArray(String src, String separator)
  4. strToArray(String string)
  5. strToArray(String string, String delim)
  6. split(String source, String separator, int arraylength)
  7. split(String str, String delims, boolean trimTokens)
  8. stringToListStr(String input)
  9. splitStringOnWhitespace(String stringToSplit)