Is it possible to compile a single quote inside single quotes?

I want to compile a string that may have a single quote in it, but I can’t figure out any way to denote the single quote is inside the string. Look at this simple job to see how code2 fails. Any idea?

static void Job10(Args _args)
XppCompiler compiler;
anytype result;
str code1 = “void doThis(){ ; info(‘This is Alex’);}”;
str code2 = “void doThis(){ ; info(‘This is Alex’s’);}”;

compiler = new XppCompiler();

// Success

result = compiler.execute(code1);
throw error(strfmt(“Error with code [%1]”, code1));

// Failure

result = compiler.execute(code2);
throw error(strfmt(“Error with code [%1]”, code2));