From: Bob Showalter Date: 2005-12-21T07:10:10+09:00 Subject: Re: iterate chars in a string shinya wrote: > Hi there! > I'm a ruby newbie, and I'm searching for a way to iterate every char in > a string, but I cannot find any easy way. My problem is to look at every > char in a string and match it with some known letter. If you just want to know if a string contains a character: puts "Yep!" if str.include?("X") > I use the String#each_byte iterator for now, but it still be a poor > solution :/ Others have suggested various iterators, but why not use standard jcode lib? require 'jcode' str.each_char { |c| puts c }