import Foundation

class ModelListItem
{
    let identifier:Int
    let compareString:String
    let filterString:String
    let name:String
    let country:String
    let latitude:Double
    let longitude:Double
    
    init(
        identifier:Int,
        name:String,
        country:String,
        latitude:Double,
        longitude:Double)
    {
        self.identifier = identifier
        self.name = name
        self.country = country
        self.latitude = latitude
        self.longitude = longitude
        
        let nameLowercase:String = name.lowercased()
        let countryLowercase:String = country.lowercased()
        
        var compareString = nameLowercase
        compareString.append(countryLowercase)
        self.compareString = compareString
        filterString = nameLowercase
    }
}

import Foundation

class ModelListItem
{
    let identifier:Int
    let compareString:String
    let name:String
    let country:String
    let latitude:Double
    let longitude:Double
    
    init(
        identifier:Int,
        name:String,
        country:String,
        latitude:Double,
        longitude:Double)
    {
        self.identifier = identifier
        self.name = name
        self.country = country
        self.latitude = latitude
        self.longitude = longitude
        
        let nameLowercase:String = name.lowercased()
        let countryLowercase:String = country.lowercased()
        
        var compareString = nameLowercase
        compareString.append(countryLowercase)
        self.compareString = compareString
    }
}

--- 
+++ 
@@ -4,6 +4,7 @@
 {
     let identifier:Int
     let compareString:String
+    let filterString:String
     let name:String
     let country:String
     let latitude:Double
@@ -28,5 +29,6 @@
         var compareString = nameLowercase
         compareString.append(countryLowercase)
         self.compareString = compareString
+        filterString = nameLowercase
     }
 }
Add filter string to item
