Java String Split splitStringToList(String pstrString, String pstrSep)

Here you can find the source of splitStringToList(String pstrString, String pstrSep)

Description

split String To List

License

Open Source License

Declaration


public static List<String> splitStringToList(String pstrString, String pstrSep) 

Method Source Code

//package com.java2s;

import java.util.ArrayList;
import java.util.Arrays;

import java.util.List;

public class Main {

    public static List<String> splitStringToList(String pstrString, String pstrSep) {
        if (pstrString == null || pstrSep == null) {
            return new ArrayList<String>();
        }//from w  w  w  .ja va 2 s.co m

        return new ArrayList<String>(Arrays.asList(pstrString.split(pstrSep)));
    }
}

Related

  1. splitString(String src, String target)
  2. splitString(String string)
  3. splitString(String string, int limit)
  4. splitStringBySeperator(final String str, final String seperator)
  5. splitStrings(String start, String end, int numSplitStrings, boolean oddLevel, List splits)
  6. splitStringWithoutTrim(String strInput, String strSplitor)
  7. splitStruct(String struct)
  8. splitSubstring(String str, String substr)
  9. splitTags(final String tagsString)