Article View: comp.std.c++
Article #3007Re: Standard ANSI string.h -- where?
From: Steve Clamage
Date: Fri, 12 Jan 1996 03:45
Date: Fri, 12 Jan 1996 03:45
31 lines
2155 bytes
2155 bytes
In article C8A@trilogy.com, "D. Allan Drummond" <allan.drummond@trilogy.com> writes: >I've been playing around a bit with the HP STL implementation. >Problem: bstring.h (an almost-ANSI-string header) doesn't >contain such simple and useful functions as begin() and end() >(which should return iterators at the beginning and end of the >string). In reading The STL<Primer>, I came across examples >that claim that just these sort of functions exist. >So, where can I find a 'real' ANSI string.h? Is there one in >the public domain? If not, where might I be able to buy one? I think that <bstring.h> is a BSD-Unix-ism. I do know it is not part of standard C or C++. I don't know whether it is part of POSIX. The standard header <string.h> must be part of any conforming C and C++ implementation. If you don't have a conforming C or C++ compiler, adding someone else's header won't do you any good. The header must match the library. P. J. Plauger's book "The Standard C Library" contains a complete implementation that you could copy. (Pay attention to the copyright restrictions.) But I would think you would be better off finding out why your C++ compiler doesn't have a <string.h>, if indeed it does not. --- Steve Clamage, stephen.clamage@eng.sun.com --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<4d3hjd$o15@engnews1.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-backReferences:
<30F4BB6C.C8A@trilogy.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++ Path: arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-back From: clamage@Eng.Sun.COM (Steve Clamage) Subject: Re: Standard ANSI string.h -- where? Message-ID: <4d3hjd$o15@engnews1.Eng.Sun.COM> Originator: fjh@munta.cs.mu.OZ.AU Sender: news@cs.mu.OZ.AU (CS-Usenet) Reply-To: clamage@Eng.Sun.COM Organization: Sun Microsystems Inc. References: <30F4BB6C.C8A@trilogy.com> X-Original-Date: 11 Jan 1996 17: 32:29 GMT Date: Fri, 12 Jan 1996 03:45:23 GMT Approved: fjh@cs.mu.oz.au X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUBMPXZaeEDnX0m9pzZAQGaRQGAkcNdhDTQavj8GKA+o8ipSu0AKa4Gn3O3 1a9xWXfzZFRix1nft6ifmojzNkfqi0CK =AjhZ