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