keep only numbers in string swift 5 code example
Example: swift string keep only numbers
let result = string.trimmingCharacters(in: CharacterSet(charactersIn: "0123456789.").inverted)
let result = string.trimmingCharacters(in: CharacterSet(charactersIn: "0123456789.").inverted)