Subject: Re: Abi string class
From: Leonard Rosenthol (leonardr@lazerware.com)
Date: Fri Feb 02 2001 - 11:49:19 CST
At 10:25 AM +0100 2/1/01, Mike Nordell wrote:
>Dom Lachowicz wrote:
>> 1) Could we also have a method called length() in addition to/instead of
>> size()?
>
>That would be in addition to. I tried to keep to the naming of C++, and
>size() is what std C++ lib uses. I could of course add a length() forwarder
>to size(), but I won't do it without a fight. :-)
If I recall correctly, length() and size() are two VERY
different methods of the standard C++ class. length() is the
functional equivalent of strlen(s), while size is actually the
allocated buffer size (which is NOT necessarily the size of the
string + 1).
Leonard
-- ---------------------------------------------------------------------------- You've got a SmartFriend in Pennsylvania ---------------------------------------------------------------------------- Leonard Rosenthol Internet: leonardr@lazerware.com America Online: MACgician Web Site: <http://www.lazerware.com/> FTP Site: <ftp://ftp.lazerware.com/> PGP Fingerprint: C76E 0497 C459 182D 0C6B AB6B CA10 B4DF 8067 5E65
This archive was generated by hypermail 2b25 : Fri Feb 02 2001 - 12:03:33 CST