Here you can find the source of splitLines(String s)
Parameter | Description |
---|---|
s | - string to split |
public static List<String> splitLines(String s)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { /**//from w w w .j a v a2 s . c o m * Splits a string of text into a list of new segments, using the splitter "!n." * @param s - string to split * @return split string */ public static List<String> splitLines(String s) { ArrayList ret = new ArrayList(); String[] split = s.split("!n"); ret.addAll(Arrays.asList(split)); return ret; } }