Java String Split stringSplitter(String string)

Here you can find the source of stringSplitter(String string)

Description

Return a List with all words in a given String

License

Apache License

Declaration

public static List<String> stringSplitter(String string) 

Method Source Code


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

import java.util.Arrays;
import java.util.List;

public class Main {
    /** Return a List with all words in a given String **/
    public static List<String> stringSplitter(String string) {
        String[] words = string.split(" ");
        return Arrays.asList(words);
    }//w w  w .  ja v a2s. c o  m
}

Related

  1. splitWithoutEscaped(String str, String sep)
  2. splitWS(String s, boolean decode)
  3. splitws(String val)
  4. stringSplit(String s)
  5. stringSplit(String string, String tokens, boolean trimStrings)