title: Ruby String Integer Scanning
body: <p>Is there a Ruby equivalent of the Java Scanner?</p>
  
  <p>If I have a string like "hello 123 hi 234"</p>
  
  <p>In Java I could do</p>
  
  <pre><code>Scanner sc = new Scanner("hello 123 hi 234");
  String a = sc.nextString();
  int b = sc.nextInt();
  String c = sc.nextString();
  int d = sc.nextInt();
  </code></pre>
  
  <p>How would you do this in Ruby?</p>