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

'characters' is deprecated: Please use String or Substring directly #2866

Closed
michael-snapptec opened this issue Oct 10, 2017 · 3 comments
Closed

Comments

@michael-snapptec
Copy link

This appears to show up 7 times in the current version.

One instance is specifically at AxisBase.swift:137.

I am not a Swift developer (Obj-C for the win!), but it appears that this can be corrected by changing this:

if longest.characters.count < text.characters.count

to this:

if longest.count < text.count
@liuxuan30
Copy link
Member

liuxuan30 commented Oct 11, 2017

What's your swift version? As my swift 4 and xcode9 does not warn this at all.

    /// A view of the string's contents as a collection of characters.
    public var characters: String.CharacterView

no sign of deprecated macro as well in my SDK. If it's beta version, we will migrate when released

Close for now.

@saldous
Copy link

saldous commented Nov 1, 2017

Please re-open, Xcode 9.1 is now released and shows these warnings.

@liuxuan30 liuxuan30 reopened this Nov 2, 2017
@liuxuan30
Copy link
Member

not updated yet; but you are welcome to file a PR for this update

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

4 participants