code: public static String escapeDelimitedColumn(String str, char delimiter) {
          if (str == null || (containsNone(str, SEARCH_CHARS) && str.indexOf(delimiter) < 0)) {
              return str;
          } else {
              StringBuilder writer = new StringBuilder();
              writer.append(QUOTE);
              for (int j = 0, n = str.length(); j < n; j++) {
                  char c = str.charAt(j);
                  if (c == QUOTE) {
                      writer.append(QUOTE);
                  }
                  writer.append(c);
              }
              writer.append(QUOTE);
              return writer.toString();
          }
      }
docs: Escapes a column in a delimited file.
  
  @param str a column {@link String}.
  @param delimiter the file's delimiter character.
  @return the escaped column {@link String}.