Java String to List stringToList(String source)

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

Description

Comma separated strings to List

License

LGPL

Parameter

Parameter Description
source comma separated strings

Return

String List

Declaration

static public List<String> stringToList(String source) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.*;

public class Main {
    /**/*from   w ww  . j a  v a2s .co m*/
     * Comma separated strings to List
     *
     * @param source comma separated strings
     * @return String List
     */
    static public List<String> stringToList(String source) {

        return Arrays.asList(source.split("\\s*,\\s*"));
    }
}

Related

  1. stringToList(String listText)
  2. StringToList(String listText, String regex)
  3. stringToList(String s)
  4. stringToList(String s)
  5. stringToList(String s)
  6. stringToList(String sText)
  7. stringToList(String str)
  8. stringToList(String str)
  9. stringToList(String str, char delimiter)