I want to extract the last value seperated by a "," which in this case would be 10, and its not necessarily a two digit value.
I tried this:
var data = 123,456,7,8,9,10 data = data.last!
I have this string
let data = 123,456,7,8,9,10
I want to extract the last value seperated by a "," which in this case would be 10, and its not necessarily a two digit value.
I have this string
let data = 123,456,7,8,9,10
I want to extract the last value seperated by a "," which in this case would be 10, and its not necessarily a two digit value.
I tried this:
var data = 123,456,7,8,9,10 data = data.last!
Post Closed as "Duplicate" by Nitin Gohel, user3151675, Eric Aya swiftUsers with the swift badge or a synonym can single-handedly close swift questions as duplicates and reopen them as needed.