The difference() returns the difference between the current String and the specified String.
Example:
String str1 = 'Hello Suresh';
String str2 = 'Hello Mahesh';
String difference = str1.difference(str2);
system.debug('Difference : '+difference);
Output:
Note: It's case sensitive.
No comments:
Post a Comment