title: I've been trying all day to try and count a users characters and print them to the screen
body: <p>I was just trying to see if there was any way to calculate how many characters a user can type minus the blanks and I can't seem to figure it out. What I've recently tried is down below.</p>
  
  <p>I created a textField where a user can enter their characters. Next, I try to do something I read about printing it like this... txtName.text!.count</p>
  
  <p>Can someone please help? </p>
  
  <pre><code>import SwiftUI
  
  import UIKit
  
  struct ContentView: View {
      @State var userInput: String = ""
      var body: some View {
          TextField("Enter your text here", text: $userInput)
  
          print($userInput.text.count)
  
      }
  }
  
  
  struct ContentView_Previews: PreviewProvider {
      static var previews: some View {
          ContentView()
  
      }
  }
  </code></pre>