Eseye Eseye - 1 year ago 97
Swift Question

How to get a substring of a label's string value in swift

I know that you can access get a substring of a string via:

let greeting = "Guten Tag!"
let index = greeting.index(greeting.startIndex, offsetBy: 7)

But what if I don't have a string but instead have a label's stringvalue such as


How do I get a substring of that stringvalue?

Answer Source

Looks like it's just a typo. It should be stringValue (upper case V).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download