Play Games

Search This Blog

Wednesday, December 2, 2015

Split function in Salesforce

Code:
string alphabets='A:B:C';
Splitting the above string with ":" (colon character)
List <String> strList = new List <String>();
strList = alphabets.split(':');
system.debug('Array '+strList );
system.debug('Alphabets :'+strList[0]);
system.debug('Alphabets'+strList[1]);
system.debug('Alphabets'+strList[2]);
Output:

No comments:

Post a Comment