Java tutorial
//package com.java2s; //License from project: Apache License public class Main { public static String MakeX10String(String nodeString) { String x10String = new String(nodeString); x10String.trim(); System.err.println(x10String.startsWith("\'")); //nodeString.c String temp = "\'"; if (x10String.startsWith("\'") && x10String.endsWith("\'")) { x10String = x10String.substring(1, x10String.length() - 1); } x10String = x10String.replace("\"", "\\\""); x10String = x10String.replace("\'\'", "\\\'"); x10String = "\"" + x10String + "\""; return x10String; } }