-
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
Learn About Apex Triggers in Salesforce & When to Use It
Apex Triggers Apex triggers allow custom actions to be performed before or after data manipulation language (DML) events occur in Salesforce, such as insertions, updates,…
Salesforce Wave: The New Salesforce Analytics Platform
For those who missed the Dreamforce keynotes or the highlights of the marketing and promotional campaigns by Salesforce teams, here is a quick one-line summary…
Popular Salesforce Videos
Boosting your Application's Marketing through Salesforce AppExchange
Explore the key benefits of AppExchange, the largest business app marketplace, and discover how you can tap into its vast ecosystem of potential customers. In…
Work Your Opportunities and Manage Your Pipeline (Lightning Experience) | Salesforce
In this video, Salesforce Support demonstrates how to work with deals and manage your pipeline in the Salesforce Lightning Experience. With interactive features that help…
How To Set Up A Site On Salesforce | Salesforce Development Tutorial
Learn how to set up a site on Salesforce. This tutorial will cover the following points - 1. Create Public Websites Choose a branded URL…