title: sscanf error: cannot convert 'String' to 'const char*'
body: <p>I'm trying to extract two numbers separated by a space from a string and save them as two ints. For example:</p>
  
  <pre><code>if input_string = "1 95" then:
  servo_choice = 1
  input_number = 95
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>String input_string = "";
  int input_number = 0;
  int servo_choice = 0;
  
  input_string = Serial.readString();
  sscanf( input_string, "%d %d", &amp;servo_choice, &amp;input_number );
  </code></pre>
  
  <p>The IDE gives me this error: </p>
  
  <pre><code>exit status 1
  cannot convert 'String' to 'const char*' for argument '1' to 'int scanf(const char*, ...)'
  </code></pre>
  
  <p>Edit: I guess </p>
  
  <pre><code>input_number = input_string.substring(1,5).toInt();
  </code></pre>
  
  <p>Actually works and does what I want. I'd still like to know how to get sscanf to work if possible.</p>
  
  <p>Thanks for any replies in advance..</p>