I have string like so "/blah//hahaha//lalala/"
Which needs to be translated into an Array of strings so that if I printed the array it would look like this print(arrayOfStrings) // prints ["blah","hahaha","lalala"]
I am new to swift so forgive me if this question is foolish
let text = "/blah//hahaha//lalala/"
let chunks = String(text.characters.dropFirst().dropLast()).componentsSeparatedByString("//")
["blah", "hahaha", "lalala"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With