Here you can find the source of quoteAtom(String term)
public static String quoteAtom(String term)
//package com.java2s; /***************************************************************************** * This file is part of the Prolog Development Tool (PDT) * // ww w. j ava 2 s . c o m * Author: Lukas Degener (among others) * WWW: http://sewiki.iai.uni-bonn.de/research/pdt/start * Mail: pdt@lists.iai.uni-bonn.de * Copyright (C): 2004-2012, CS Dept. III, University of Bonn * * All rights reserved. This program is made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * ****************************************************************************/ public class Main { public static String quoteAtom(String term) { return "'" + term.replace("'", "\\'") + "'"; } }