From: "Hal E. Fulton" Date: 2002-08-22T04:12:47+09:00 Subject: ANN: scanf for Ruby This is the product of the Austin Ruby Codefest 2002, a weekend event which concluded on Wednesday. Contributing were David Alan Black, Hal Fulton, Nolan Darilek, and Jason Johnston. This is a pure Ruby implementation of (most of) the C scanf(3) function. Look in the RAA or at this URL: http://rubyhacker.com/code/scanf/ There are scanf methods added to String, IO, and Kernel (corresponding to C's sscanf(), fscanf(), and plain vanilla scanf(), respectively). There are over 130 testcases, for those who want to know that. Rationale for creating it: 1. You can use regular expressions to retrieve substrings, but they're not converted automatically to Fixnum or Float. This takes care of that. 2. Given printf, sprintf, and String#%, scanf makes sense for more completeness. 3. Another bone tossed to C programmers. Those brain cells you used learning format strings won't go to waste. Thanks, Hal Fulton