🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by D. Allan Drummond Thu, 11 Jan 1996 15:34
Standard ANSI string.h -- where?
#3005
Author: D. Allan Drummond
Date: Thu, 11 Jan 1996 15:34
20 lines
1343 bytes
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?

Thanks,

Allan

http://www.trilogy.com/home_pages/drummond/index.html
allan.drummond@trilogy.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. ]
Re: Standard ANSI string.h -- where?
#3007
Author: Steve Clamage
Date: Fri, 12 Jan 1996 03:45
31 lines
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. ]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads