Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
For con enumerate en swift
for (i,c) in chars.enumerate() {
if i >= tam {
return nil
} else if c < "0" || c > "9" {
return nil
} else {
let digito = Int(String(c))!
if num.contains(digito) {
return nil
}
num.append(Int(String(c))!)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment