I want to write the following in a more elegant way:
let number = "1,2922.3"
if number.contains(",") || number.contains(".") && !(number.contains(".") && number.contains(",")) {
// proceed
}
That is, I want to proceed if the number has "." or ",", but not them both.
There has to be a better way?
I don't want to use an extension, as this is in a single place in my code.