-
Splitting the string removes the delimiter
When I am Splitting any string using the split() method then it is working good but the problem is that after splitting it removes the char that is used foe splitting
like
String str = 'abc-xyz-pqrs-zykp';
list<String>test = str.split('-');
Output : {abc,xyz,pqrs,zykp}
Actual outPut that I want : {abc,-xyz,-pqrs,-zykp};
I want this to be done without iterating the above list in a for loop.
Log In to reply.
Popular Salesforce Blogs
How to use Loading Spinner in Salesforce Lightning Component?
How to use Loading Spinner in the Salesforce Lightning Component? Definition of Loading Spinner: Don’t forget to check out: How Variable Types Operate in the…
Salesforce: How AI, CRM, and Einstein 1 Are Transforming Businesses in the USA
Businesses are rushing to improve their customer interactions, optimise processes, and achieve growth in today's fast-paced digital environment. Salesforce, the world's Top AI-powered CRM platform…
Popular Salesforce Videos
Salesforce Financial Services Cloud Implementation Guide
You’ve decided to use Salesforce Financial Services Cloud but where do you begin? How can you utilize Salesforce to track all your customer interactions and…
Salesforce Document Automation
Salesforce recently announced the release of an Intelligent Document Automation tool aimed at allowing healthcare and life sciences companies to digitize document-management processes. The tool,…
Salesforce Integration | GET Method - Part 2 | Salesforce
Salesforce integration is the process of merging the data and functionality of Salesforce with another application to provide users with a single unified experience. It…