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:
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