From: "Martin DeMello" <martindemello / yahoo.com>


> Takaaki Tateishi <ttate / kt.jaist.ac.jp> wrote:
> > I proposed a method like str1.include?(str2,beg,n), which means that
> > str1[beg,n] is equal to str2[0,n].
> > If we write "str1[beg,n] == str2[0,n]", we extract sub-strings and
> > new objects are created. I think this brings much cost when we want to
> > repeat to compare two sub-strings whereas we don't need new sub-strings.
> 
> Ah, okay, I see. I can think of places this would have been useful -
> have any other names been proposed? How about String#at?(beg, n, str)?
> 
> martin

I propose String#matches?(beg, n, str)

Gavin