Here you can find the source of removeColumn(String line, int index)
static String removeColumn(String line, int index)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Arrays; public class Main { static String removeColumn(String line, int index) { ArrayList<String> splittingLine = new ArrayList<String>( Arrays.asList(line.split(","))); splittingLine.remove(index);/*from w ww . j a v a 2 s . c o m*/ return strArrayListToString(splittingLine); } static void removeColumn(ArrayList<String> lines, int index) { for (int i = 0; i < lines.size(); i++) { lines.set(i, removeColumn(lines.get(i), index)); } } static String strArrayListToString(ArrayList<String> lstLine) { String line = ""; for (int i = 0; i < lstLine.size(); i++) { line = line + lstLine.get(i); if (i != lstLine.size() - 1) line = line + ","; } return line; } }