Thursday, September 3, 2020

Remove spaces from a string using apex in Salesforce

Use the deleteWhitespace() to remove spaces from a string in Salesforce.

Ex:

String str = 'Salesforce Code Crack';
system.debug(str.deleteWhitespace());
Output


No comments:

Post a Comment