Use the deleteWhitespace() to remove spaces from a string in Salesforce.
Ex:
String str = 'Salesforce Code Crack';
system.debug(str.deleteWhitespace());Output
Use the deleteWhitespace() to remove spaces from a string in Salesforce.
Ex:
String str = 'Salesforce Code Crack';
system.debug(str.deleteWhitespace());Output