Java String to List stringToList(String input)

Here you can find the source of stringToList(String input)

Description

string To List

License

Open Source License

Declaration

public static List<String> stringToList(String input) 

Method Source Code


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

import java.util.*;

public class Main {
    public static List<String> stringToList(String input) {
        List<String> list = new ArrayList<String>();
        for (String element : input.split("-")) {
            list.add(element);//from w  ww  .  ja va  2 s . com
        }
        return list;
    }
}

Related

  1. stringToItems(List fontsList, boolean useSeparator)
  2. stringToList(final String string)
  3. stringToList(String content)
  4. stringToList(String content, String splitter)
  5. stringToList(String delimitedString)
  6. stringToList(String keywords, String delimiter)
  7. stringToList(String listString, String delimiter)
  8. stringToList(String listText)
  9. StringToList(String listText, String regex)