removeEnd() can be used to remove the last character from a String in Salesforce Apex.
Sample Code:
String str = 'Approved/Rejected/';
str = str.removeEnd('/');
system.debug('Value is ' + str);
Output:
removeEnd() can be used to remove the last character from a String in Salesforce Apex.
Sample Code:
String str = 'Approved/Rejected/';
str = str.removeEnd('/');
system.debug('Value is ' + str);
Output: