Here you can find the source of removeNetLogoCommentsAndEmptyLines( String lines[])
public static ArrayList<String> removeNetLogoCommentsAndEmptyLines( String lines[])
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { public static ArrayList<String> removeNetLogoCommentsAndEmptyLines( String lines[]) {// w w w.ja va 2 s .c om ArrayList<String> result = new ArrayList<String>(); for (int i = 0; i < lines.length; i++) { String line; int semicolon = lines[i].indexOf(';'); if (semicolon < 0) { line = lines[i]; } else { line = lines[i].substring(0, semicolon); } if (!line.trim().isEmpty()) { result.add(line); } } return result; } }