[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string-match bug?
From: |
Matthew Dempsky |
Subject: |
Re: string-match bug? |
Date: |
Wed, 9 Dec 2009 10:07:56 -0800 |
On Wed, Dec 9, 2009 at 9:33 AM, Andreas Röhler
<andreas.roehler@easy-emacs.de> wrote:
> But simply by convention, isn't it?
No. It's because it's consistent and makes sense. That's why every
sane programming language does it this way:
C: s = "foo", strstr(s, "") evaluates to s
C++: string("foo").find("") evaluates to 0
Python: 'foo'.find('') evaluates to 0
Ruby: 'foo'.index('') evaluates to 0
Perl: index("foo", "") evaluates to 0
- Re: string-match bug?, (continued)
- Message not available
- Re: string-match bug?, Barry Margolin, 2009/12/08
- Re: string-match bug?, Pascal J. Bourguignon, 2009/12/08
- Re: string-match bug?, Stefan Monnier, 2009/12/09
- Re: string-match bug?, Matthew Dempsky, 2009/12/08
- Re: string-match bug?, Andreas Röhler, 2009/12/09
- Re: string-match bug?, Juanma Barranquero, 2009/12/09
- Re: string-match bug?, Andreas Röhler, 2009/12/09
- Re: string-match bug?,
Matthew Dempsky <=
- Re: string-match bug?, tomas, 2009/12/09
- Re: string-match bug?, Andreas Röhler, 2009/12/09
- Re: string-match bug?, Matthew Dempsky, 2009/12/09
- Message not available
- Re: string-match bug?, Barry Margolin, 2009/12/09
- Re: string-match bug?, tomas, 2009/12/09
- Re: string-match bug?, Kevin Rodgers, 2009/12/09
- Message not available
- Re: string-match bug?, Stefan Monnier, 2009/12/10
- Re: string-match bug?, tomas, 2009/12/10
- Re: string-match bug?, Andreas Politz, 2009/12/10
- Re: string-match bug?, Kevin Rodgers, 2009/12/10