How to find substring of string after particular character using Apex in Salesforce?

substringAfter() is used to find substring of string after particular character using Apex in Salesforce

Sample Code:

String str = 'abc-xyz';
system.debug('Expected is ' + str.substringAfter('-'));

Output:


Cheers!!!

No comments:

Post a Comment