Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example does not work on Swift2 #12

Closed
ghost opened this issue Nov 5, 2015 · 2 comments
Closed

Example does not work on Swift2 #12

ghost opened this issue Nov 5, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 5, 2015

Compilation error using advance:
let replace = pattern[advance(pattern.startIndex, 1)...advance(pattern.endIndex, -2)]

Error is:
'advance' is unavailable: call the 'advancedBy(n)' method on the index

@ghost
Copy link
Author

ghost commented Nov 5, 2015

let replace = pattern[advance(pattern.startIndex, 1)...advance(pattern.endIndex, -2)]

Replace above line by the one below:
let replace = pattern[pattern.startIndex.advancedBy(1)...pattern.endIndex.advancedBy(-2)]

@daltoniam
Copy link
Owner

Fixed. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant