Substring?

Hi,

 

I found a Swift example containing this expression:

 

attributes.substring(from: 1, to: 2)

 

When I type this into Xcode it comes up as a syntax error.

 

I guess this is something they changed in Swift between 3 and 4, or 2 and 3, or something.

 

What is the correct way to do this now?

Powered by WPeMatico

You may also like...

Comments are closed.