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

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:

Leave a Reply