Simple Problem

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

http://www.rubycentral.com/ref/ref_c_string.html

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