At 12:31 PM +0900 4/1/02, Yukihiro Matsumoto wrote: >Hi, > >In message "String#begins?(s)" > on 02/04/01, Tim Sutherland <timsuth / ihug.co.nz> writes: > >|class String >| def begins?(s) >| self[0...(s.size)] == s >| end >|end should this return false if s.size > self.size before checking for '=='? >|Worthwhile? > >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? has_prefix? starts_with? -- Garance Alistair Drosehn = gad / eclipse.acs.rpi.edu Senior Systems Programmer or gad / freebsd.org Rensselaer Polytechnic Institute or drosih / rpi.edu