import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Util{
public static List multiline(String source, int width)
{
List newlines = Arrays.asList(source.split("\\s"));
ArrayList lines = new ArrayList(newlines.size());
for(String newline : newlines)
{
if(newline == null)
{
lines.add(null);
continue;
}
while(newline.length() > width)
{
lines.add(newline.substring(0, width));
newline = newline.substring(width);
}
if(newline.length() > 0)
lines.add(newline);
}
return lines;
}
}