Zeev Suraski wrote:
> At 10:25 03/09/2002, [EMAIL PROTECTED] wrote:
> 
>> > strlen() overloaded by mb_strlen might causes some problems because it
>> > is used to measure length of string and to measure length of binary
>> > data.  So, a new function to measure string length only (or binary
>> > length only) will be necessary.
>>
>> Sure, I don't think that will be a problem.
> 
> 
> I do.  strlen() should go on returning the binary length, breaking that 
> is really a bad idea.  We can introduce a new function altogether that 
> returns the 'calculated' MB aware length, that won't cause any problems.
> 

We are planning to introduce string_len() that always returns number
of chars and byte_len()(or string_byte()) that returns number of bytes.
(There mbstring has mb_strlen() so string_len() would be alias)

Current strlen() do not provide these features.

byte_len()'s problem is there are too many functions that allocates
more memory than it is needed. We might have to do something
about this or just return length inculdes garbages or make it
act like current strlen()

Opinions?

--
Yasuo Ohgaki


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to