Simple Problem


#1

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


#2

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


#3

You should read the Ruby documentation at http://www.ruby-doc.org/core/

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://read.saush.com
http://jaccal.sourceforge.net