🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #490

Proposed addition to string library: strnew

#490
From: David Fox
Date: Fri, 07 Sep 1990 17:02
7 lines
526 bytes
I propose the following function be added to the standard string.h:

inline char *
strnew(const char *s) 
{
  return s ? strcpy(new char[strlen(s)+1], s) : 0;
}
Technical Details
Message-ID: <FOX.90Sep7130228@devo.research.att.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!decwrl!ucbvax!ulysses!fox

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!decwrl!ucbvax!ulysses!fox
From: fox@research.att.com (David Fox)
Newsgroups: comp.std.c++
Subject: Proposed addition to string library: strnew
Message-ID: <FOX.90Sep7130228@devo.research.att.com>
Date: 7 Sep 90 17:02:28 GMT
Sender: netnews@ulysses.att.com
Distribution: comp
Organization: AT&T Bell Laboratories
Lines: 7