         didSet {
             if let placeholder = placeholder {
                 let attributedString = NSMutableAttributedString(string: placeholder)
-                let parkedTextRange = NSMakeRange(placeholderText.characters.count, parkedText.characters.count)
+                let parkedTextRange = NSMakeRange(placeholderText.count, parkedText.count)
                 if placeholder.hasSuffix(parkedText) {
                     attributedString.addAttributes(parkedTextAttributes, range: parkedTextRange)
                     attributedPlaceholder = attributedString

    
    @objc func textChanged(_ sender: UITextField) {
        switch typingState {
        case .start where text!.characters.count > 0:
            text = typedText + parkedText
            updateAttributedTextWith(text!)
            prevText = text!

    
    var beginningOfParkedText: UITextPosition? {
        get {
            return position(from: endOfDocument, offset: -parkedText.count)
        }
    }
    
