On Mon, Mar 08, 2010 at 03:44:28PM +0000, Anselm R Garbe wrote:
> [...]
> Sure, but according to the spec:
> 
> "The strlen() function shall compute the number of bytes in the string
> to which s points, not including the terminating null byte."
> 
> strlen() should not count multi-char characters as 1 but rather return
> number of bytes. Do you disagree?
> [...]

I never read the actual docs of that function (a few glances at the
manpage aside), and if it definitely says "count the number of bytes",
fine. But intuitively, I would've thought it gives the length of a
string, as in "how many letters appear on my screen if I printf()
this?".

-- 
GCS/IT/M d- s+:- a-- C++ UL+++ US UB++ P+++ L+++ E--- W+ N+ o--
K- w--- ?O M-- ?V PS++ PE- Y++ PGP+++ t+ 5 X+ R tv b+++ DI+++
D+++ G+ e h! r y+

    Gregor Best

Attachment: pgpegLFWIw8d4.pgp
Description: PGP signature

Reply via email to