Java String Split by Delimiter split(String text, String delimiter)

Here you can find the source of split(String text, String delimiter)

Description

split

License

Open Source License

Declaration

public static List<String> split(String text, String delimiter) 

Method Source Code

//package com.java2s;

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static List<String> split(String text, String delimiter) {
        String[] parts = text.split(delimiter);

        List<String> list = new ArrayList<String>();

        for (String part : parts) {
            list.add(part);//from  w w w .  j  ava2  s  .co m
        }

        return list;
    }
}

Related

  1. split(String string, String delim, boolean doTrim)
  2. split(String string, String delimiter)
  3. split(String string, String delimiter)
  4. split(String stringToSplit, char delimiter)
  5. split(String strToSplit, char delimiter)
  6. split(String value, char delim)
  7. split(String value, char delimiter)
  8. split(String value, String delimiter)
  9. split(String value, String delimiter)