Re: [PHP4BETA] New function chrcount
| From: | Andi Gutmans | Date: | Tue, 25 Apr 2000 08:15:14 +0000 |
| Subject: | Re: [PHP4BETA] New function chrcount | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-14045@lists.php.net to get a copy of this message | ||
Nope and I also vote for substr_count() and so does Zeev who suggested it
in the first place :)
Andi
On Tue, 25 Apr 2000, Cynic wrote:
> I'm probably late (it's 10AM here), but I vote for substr_count().
>
> At 00:55 25.4.2000 +0300, Andi Gutmans wrote the following:
> --------------------------------------------------------------
> >At 12:52 AM 4/25/00 +0300, Andi Gutmans wrote:
> >>At 04:45 PM 4/24/00 -0500, Andrei Zmievski wrote:
> >>>On Mon, 24 Apr 2000, Colin Viebrock wrote:
> >>> > How about num_times_char_is_in_string()? :)
> >>> >
> >>> > I'm still rooting for str_chr_freq(), or even just chr_freq(). I realize
> >>> > that etyomologists may cringe at the inexact use of "frequency",
> >>> > but
> >>> > "char_occurence" and "char_tally" look or sound funny,
> >>> > and and agree
> >>> > with Andi that "*_count" is kina ambiguous.
> >>> >
> >>> > How about str_matches() or chr_matches() ?
> >>>
> >>>Well, this is ambiguous too. Is "matches" a noun or a verb here?
> >>
> >>What is ambiguous is str_count(). It barely gives you a clue of what the function does.
> >>num_str_matches() might be more appropriate. Don't save a few characters just
> >>because you want to type less, it is more important that you find a name which makes sense and that
> >>the function's behavior can more or less be understood by its name.
> >
> >Another possiblity is:
> >substr_count()
> ------end of quote------
>
>
> ____________________________________________________________
> Cynic:
>
> A member of a group of ancient Greek philosophers who taught
> that virtue constitutes happiness and that self control is
> the essential part of virtue.
>
> cynic@mail.cz
> ICQ: 2808 2505
>
>
>
>
>