so I have a string like this 0b00001
is there a way to turn that into an Int, I tried something like this,
let string = "0b0001"
let int = Int(string)
but since there is a "b" in the string to specify that it is binary it sets int
to nil
.
Is there any way to turn the contents of string
into an int?