X
xhoster
Martijn Lievaart said:No I did not try it.
Or, apparently, understand it.
I don't have to. this C implementation stops at the
first null character.
Sure, it stops at the first null in s2. But not the first null in s1.
Well, the *inner* loop does stop at the first null in s1, but then it
restarts. And restarts again. And again. It doesn't stop for good until it
hits the "first" (and last) null in s2.
Why do you think it'll behave otherwise?
Because I wrote it that way on purpose, and because I tested it.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.