On Mon, 2008-11-10 at 19:22 +0000, Scott Lawrence wrote:
> UtlString is poorly named... it really should be UtlBuffer, since it is
> _not_ assumed that it is always null terminated.  Many of the methods
> that copy to and from strings always add the null, though, and there are
> probably lots of bugs in the code that assume it's always there.  If you
> do the copy with methods that just take a pointer and a length, you
> don't always get the null.

Actually, UtlString is constructed so that after the length() bytes,
there is always a NUL byte.  Of course, that's not particularly
interesting if the data includes NULs.  But if you happen to know that
the data does not contain NULs, you can use data() as a C string.

Dale


_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to