You need to sign in to do that
Don't have an account?

how to check for '' in apex
String s = '\'';
system.debug('s contains single quote='+s.contains('\''));
String s2 = '"';
system.debug('s2 contains double quote='+s2.contains('"'));
String s3 = '\\';
system.debug('s3 contains backslash='+s3.contains('\\'));
String s4 = '''';
system.debug('s2 contains double quote='+s2.contains(''''));
The attachement would give more details....thanks

system.debug('s contains single quote='+s.contains('\''));
String s2 = '"';
system.debug('s2 contains double quote='+s2.contains('"'));
String s3 = '\\';
system.debug('s3 contains backslash='+s3.contains('\\'));
String s4 = '''';
system.debug('s2 contains double quote='+s2.contains(''''));
The attachement would give more details....thanks
Let us know if this will help you
THanks
Amit Chaudhary