strings

Doug Gwyn gwyn at smoke.BRL.MIL
Sun May 14 10:37:27 AEST 1989


In article <10245 at socslgw.csl.sony.JUNET> diamond at csl.sony.junet (Norman Diamond) writes:
>It [null-terminated strings] seems intrinsically worse to me.

I thought it was well known that each method (associated count vs.
terminator) has advantages in some contexts and disadvantages in
others.  Many interesting operations on strings are faster with null
terminator values than when an associated count must be tested.  The
main drawback to terminated strings is that the terminator value
cannot be contained within the string.

If you want counted strings, C makes it relatively easy to provide
them for yourself.



More information about the Comp.lang.c mailing list