private final static void writeField(PrintWriter writer, String fieldValue,
			TaskMonitor monitor) {
		writer.print("\"");
		for (int i = 0; i < fieldValue.length(); ++i) {
			if (monitor.isCancelled()) {
				break;
			}

			if (fieldValue.charAt(i) == '"') {//embedded separator
				writer.print("\\\"");
			}
			else if (fieldValue.charAt(i) == ',') {
				writer.print("\\,");
			}
			else {
				writer.print(fieldValue.charAt(i));
			}
		}
		writer.print("\"");
	}
Write the given field value into the file specified by the writer.
All fields will be enclosed in double-quotes. Also, all embedded
double-quotes will be escaped.
<p>
Note: when importing into Excel, the quotes are stripped off.
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/GTableToCSV.java