Here you can find the source of cleanTextForCSV(final String input)
public static String cleanTextForCSV(final String input)
//package com.java2s; public class Main { public static String cleanTextForCSV(final String input) { if (input == null) return ""; return "\"" + input.replaceAll("\"", "\"\"") + "\""; }//from w ww . j a v a 2 s.com }