How to remove last character from a String in Apex?

Sample Code:

String str = 'Approved/Rejected/';
str = str.removeEnd('/');
system.debug('Value is ' + str);

Output:




Cheers!!!

No comments:

Post a Comment