println("  public aterm.ATerm " + "stringToChars(String str) {"); println("    int len = str.length();"); println("    byte chars[] = str.getBytes();"); println("    aterm.ATermFactory factory = getPureFactory();"); println("    aterm.ATermList result = factory.makeList();"); println(); println("    for (int i = len - 1; i >= 0; i--) {"); println("      result = result.insert(factory.makeInt((int) chars[i]));"); println("    }"); println(); println("    return (aterm.ATerm) result;"); println("  }"); println(); }
println("  public aterm.ATerm " + "stringToChars(String str) {"); println("    int len = str.length();"); println("    byte chars[] = str.getBytes();"); println("    aterm.ATermFactory factory = getPureFactory();"); println("    aterm.ATermList result = factory.makeList();"); println(); println("    for (int i = len - 1; i >= 0; i--) {"); println("      result = result.insert(factory.makeInt(chars[i]));"); println("    }"); println(); println("    return (aterm.ATerm) result;"); println("  }"); println(); }
    private void genStringToChars() {        println("  public aterm.ATerm " + "stringToChars(String str) {");        println("    int len = str.length();");        println("    byte chars[] = str.getBytes();");        println("    aterm.ATermFactory factory = getPureFactory();");        println("    aterm.ATermList result = factory.makeList();");        println();        println("    for (int i = len - 1; i >= 0; i--) {");        println("      result = result.insert(factory.makeInt((int) chars[i]));");        println("    }");        println();        println("    return (aterm.ATerm) result;");        println("  }");        println();    }