Skip to content

NSAttributedString range error #10

@NickMeepo

Description

@NickMeepo

We should use NSString.length instead of String.count when dealing with NSRange and NSAttributedString. NSRange(location: 0, length: (labelText as NSString).length) is preferred to NSRange(location: 0, length:labelText.count).
The error will occur when text is matching the suggestion "George😁Washington".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions