From: Thomas Luedeke Date: 2013-04-18T05:24:45+09:00 Subject: String index produces unanticipated result I have the following string I am pulling from a file (asterisks used to show boundaries of line, and are not actually there: * 9 3 3 0 0* I want to test to see if a "9" is in the first five columns of the line. Typically it is in column five, but not necessarily. I tried the "puts line.strip[0]" command, which returns "57". Huh? Where did "57" come from?? Same thing happens with strip!. Why isn't this simply removing the leading white space and returning "9"?? I don't understand how to accomplish my task now. I tried the online irb, and it gave me "9", like I'd have expected. -- Posted via http://www.ruby-forum.com/.