Raj Singh wrote:
> length = 20
> text = ' This forum is connected to a mailing list that is read by
> thousands of people.'
> 
> 
> text.split[0..length]
> 
> I looked at the split api but can't understand how the above code is
> working.

Its not specific how you want to split your string but may be

split_text = split('')

will split the string of characters like,

T
h
i
s

f
o
......


so samething like

split_text = split(' ')

withh split the string into an array of strings like

This
forum
is
connected
to
a
mailing
list
.....


so if you give your specifications clearly we are ready to help you Raj 
singh..


--- Jose Martin
-- 
Posted via http://www.ruby-forum.com/.