Is it possible to select a portion of string? For example, in many
websites, they give the first paragraph in the main page and link for
the article on the other page. I remember this is available in PHP.
Any help is appreciated.
Thanks
Rizwan
Is it possible to select a portion of string? For example, in many
websites, they give the first paragraph in the main page and link for
the article on the other page. I remember this is available in PHP.
Any help is appreciated.
Thanks
Rizwan
Rizwan R. <rizwan@…> writes:
Is it possible to select a portion of string? For example, in many
websites, they give the first paragraph in the main page and link for
the article on the other page. I remember this is available in PHP.Any help is appreciated.
Thanks
Rizwan
come on, this took 3 seconds to google: ruby substring
You should read the Ruby documentation at RDoc Documentation
Check out the entry on String. What you are probably looking for is
a_string.slice or a_string[]
Rizwan R. wrote:
Is it possible to select a portion of string? For example, in many
websites, they give the first paragraph in the main page and link for
the article on the other page. I remember this is available in PHP.Any help is appreciated.
Thanks
Rizwan
–
Sau S.
http://blog.saush.com
http://read.saush.com
http://jaccal.sourceforge.net
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs