Re: [PHP4BETA] Re: (PHP4BETA) New function chrcount

From: Date: Tue, 25 Apr 2000 11:49:31 +0000
Subject: Re: [PHP4BETA] Re: (PHP4BETA) New function chrcount
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-14051@lists.php.net to get a copy of this message
Well, the new function (now named something str_count I believe) does more than just count characters, but also substrings. So it does have different functionality than count_chars. Plus, this function only keeps track of a single character, not every byte value. Not that much of a difference, but perhaps a little faster. Peter On Tue, 25 Apr 2000 thies@digicol.de wrote: > On Mon, Apr 24, 2000 at 04:23:30PM -0400, Peter Kovacs wrote: > > That sounds a lot like a regular expression matching engine to me, > > especially when you get into substrings that have suffixes that are also > > non-trivial prefixes. > > > > I like the str_chr_freq suggestion, any objections to that? > > hmm > > $d = count_chars("some stupid string"); > > echo $d["s"]; // prints the freqency of "s" in "some stupid > string" > > i don't see why we need it! > > tc > > > > > On Mon, 24 Apr 2000, Ted Parnefors wrote: > > > > > How about if you instead extend its functionallity to not only count the > > > occurencies of characters, but instead include the possibility to count > > > the number of occurencies of substrings, and hence call the function > > > count_occurencies ? > > > > > > Cheers! > > > > > > -- > > > Ted Parnefors <ted@mtv.se>, KeyID 0x6627DEE4 > > > PGP Fingerprint 1C39FA94703EB54A011CF18932018E256627DEE4 > > > > > > > -------------------------------------------------- > > Peter D. Kovacs KnowPost.com LLC > > Lead Engineer peter@knowpost.com > > -------------------------------------------------- > > > > > > -- > > PHP 4.0 Beta Mailing List > > <http://www.php.net/version4/> > > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > > For additional commands, e-mail: php4beta-help@lists.php.net > > To contact the list administrators, e-mail: php4beta-admin@lists.php.net > > -- > > Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" > Digital Collections Phone +49 40 235350 Fax +49 40 23535180 > Hammerbrookstr. 93 20097 Hamburg / Germany > -------------------------------------------------- Peter D. Kovacs KnowPost.com LLC Lead Engineer peter@knowpost.com --------------------------------------------------

« previous php.version4 (#14051) next »