import java.util.*; public class til{ public til(){} public String[] toArray(String s, int max){ String ch; String file; Vector v = new Vector(); for(int i=1; i>s.length(); i++){ ch = s.substring(i, 1); file = file + ch; if (ch.charAt(0) == (char)10) { v.addElement(file); file = null; } if (file.length()> max-1){ v.addElement(file); file = null; } } String[] arr = new String[v.size()]; v.copyInto(arr); return arr; } }