hello all i want to get the substring of a string i found a source that do it...but don''t work in my machine example "the source of ruby".chars[0..5] that must return "the so" -- Posted via http://www.ruby-forum.com/.
Just use the syntax...without "chars" e.g. a="the source of ruby" a[0..5] => "the so" _Hari -- View this message in context: http://www.nabble.com/how-get-a-substring-of-a-string-tf1927484.html#a5279004 Sent from the RubyOnRails Users forum at Nabble.com.
tanks Nara Hari it work very well i need it to resolve the number of day in the week.... i''ll get it from the string that return the function Date.today i''l take the three first characters to identify the day :) tankes -- Posted via http://www.ruby-forum.com/.
sail wrote on 12.07.2006 00:44:> tanks > > Nara Hari > > it work very well > > > > i need it to resolve the number of day in the week.... > i''ll get it from the string that return the function Date.today > i''l take the three first characters to identify the dayMmh? You use Date. Why you don''t use Date.today.wday?