From: David Alan Black Date: 2002-04-01T23:33:39+09:00 Subject: Re: String#begins?(s) Hello -- On Mon, 1 Apr 2002, Rik Hemsley wrote: > #if Garance A Drosihn > > At 12:31 PM +0900 4/1/02, Yukihiro Matsumoto wrote: > > >I don't like the name "begins?". It's not obvious. > > >I don't like names like "beginWith?" or "begin_with?" neither. > > > > prefix? > > prefixes? > > is_prefix? > > None of these are correct descriptions of what the method does. > > > has_prefix? > > starts_with? > > These are better. > > prefixed_by?, starts_with?, begins_with? are the most suitable IMO, with > begins_with? being the best. I don't see how the first n chars of a string are a "prefix". Mind you, I'm not convinced that this method needs to be in the core language. It seems like a good example of something that can be added easily, ad hoc, using whatever name the person likes :-) David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav