Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Lőrinczy Zsigmond <nospam@for.me> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Code for strlen |
| Date | 2015-03-21 20:27 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <mekgmr$4fo$1@speranza.aioe.org> (permalink) |
| References | <mek3a7$rvp$1@speranza.aioe.org> <20150321090457.184@kylheku.com> <Z4hPw.66468$Lw2.55565@fx30.iad> <33002fd7-b493-44e5-bc54-010fb89786b8@googlegroups.com> |
On 2015.03.21. 17:41, Malcolm McLean wrote:
> The OP is a troll post by someone pretending to be Jacob.
> Better make that clear.
I guessed that, too;
but I still would like to point out than strlen
might be trivial, but strnlen isn't;
at least I've seen two different
platform where it didn't work correctly.
1. BS2000 calculated strnlen (ptr, maxlen) as
min (strlen (ptr), maxlen)
2. AIX 5.old gave very strange results:
strnlen("JV02B ",1)=3
strnlen("JV02B ",2)=2
strnlen("JV02B ",3)=1
strnlen("JV02B ",4)=0
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Code for strlen jacob navia <jacob@jacob.remcomp.fr> - 2015-03-21 16:38 +0100
Re: Code for strlen Kaz Kylheku <kaz@kylheku.com> - 2015-03-21 16:09 +0000
Re: Code for strlen Greg Martin <greg.at.softsprocket@dot.com> - 2015-03-21 16:35 +0000
Re: Code for strlen Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-03-21 09:41 -0700
Re: Code for strlen Lőrinczy Zsigmond <nospam@for.me> - 2015-03-21 20:27 +0100
Re: Code for strlen Kaz Kylheku <kaz@kylheku.com> - 2015-03-21 17:13 +0000
Re: Code for strlen Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-03-21 09:35 -0700
Re: Code for strlen Keith Thompson <kst-u@mib.org> - 2015-03-21 15:01 -0700
Re: Code for strlen jacob navia <jacob@jacob.remcomp.fr> - 2015-03-21 18:25 +0100
Re: Code for strlen Aleksandar Kuktin <akuktin@gmail.com> - 2015-03-21 22:46 +0000
csiph-web