Re: Re: mbstring
| From: | Yasuo Ohgaki | Date: | Tue, 03 Sep 2002 09:16:24 +0000 |
| Subject: | Re: Re: mbstring | ||
| References: | 1 2 3 4 5 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-87863@lists.php.net to get a copy of this message | ||
Zeev Suraski wrote:
At 10:25 03/09/2002, derick@php.net 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.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 OhgakiSure, 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.