Blog

Main » 2019 » August » 02

list fixCity = new list([Select Id, City__c from Contact where City__c like '%,%' LIMIT 2);
//system.debug(tweContact.size());

for (Contact c: fixCity ) {
    Set<String> city = new Set<String>();
     c.addAll(city.City__c.split(','));
    system.debug(city);
}