From: globalrev Date: 2008-05-08T02:05:05+09:00 Subject: Re: Check if char in string? On 7 Maj, 18:32, Marc Heiler wrote: > globalrev wrote: > > how do i do this: > > > str = "you muppet" > > > if "y" in str: > > print "its in there" > > > whats the best source for documentation on Ruby? i googled and checked > > the homepage of ruby but there isnt really a clear one or im jus > > duuumb. > > str = "you muppet" > puts "its in there" if str.include? 'y' > > -- > Posted viahttp://www.ruby-forum.com/. hmm it only works for one character though. i want to do: if x in 'aeiouy': do this else: do that