apex escape single quote code example Example: apex add single quote String newString = '\''+ oldString + '\'';