
13 May
2004
13 May
'04
4:23 p.m.
David Abrahams wrote:
John Nagle <nagle@overbot.com> writes:
If you're willing to accept a call to "new", you can just use std::string and reserve some initial size.
Char_string should truncate and maintain null-termination for the C-type operations, including strcat strcopy sprintf etc. An exception should only occur for explicit subscripting out of range: char_string s<10>; s[11] = 'x'; Remember, a major purpose of char_string is to stop buffer overflow attacks. It's primarily for retrofit to old code. New code should use <string>. This should be a simple, all-inline, no library .hpp file. John Nagle Animats