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

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

// Failure

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