Android String Split stringToListByLine(final String fileContent)

Here you can find the source of stringToListByLine(final String fileContent)

Description

string To List By Line

Declaration

public static List<String> stringToListByLine(final String fileContent)
        throws Exception 

Method Source Code

//package com.java2s;

import java.util.LinkedList;
import java.util.List;

public class Main {

    public static List<String> stringToListByLine(final String fileContent)
            throws Exception {
        List<String> lineList = new LinkedList<String>();
        for (String line : fileContent.split("\n")) {
            lineList.add(line);//  ww  w . j a  va 2  s. c  om
        }
        return lineList;
    }
}

Related

  1. getStringArray(String str)
  2. split(String source, String separator, int arraylength)
  3. split(String str, String delims, boolean trimTokens)
  4. stringToListStr(String input)
  5. splitStringOnWhitespace(String stringToSplit)
  6. split(String str, String separatorChars)
  7. split(String str, char delimiter)
  8. split(String str, char separator)
  9. parseDelimitedList(String list, char delimiter)