String Split method in Apex in Salesforce March 17, 2020June 9, 2022InfallibleTechie Admin Sample Code: String str = ‘abc-xyz-123’;List < String > strList = str.split( ‘-‘ );System.debug( ‘List String is ‘ + strList ); Output: