March 17, 2020

String Split method in Apex in Salesforce

Sample Code:

String str = 'abc-xyz-123';
List < String > strList = str.split( '-' );
System.debug( 'List String is ' + strList );


Output:


No comments:

Post a Comment