]> cygwin.com Git - cygwin-apps/setup.git/blobdiff - String++.cc
2003-02-16 Pavel Tsekov <ptsekov@gmx.net>
[cygwin-apps/setup.git] / String++.cc
index 8d02eb6d4e124826e35cea7ccf8dc68e8ba1faa1..4d089a86d706adc16c422d8022e31d3d647d0bc5 100644 (file)
 #include "String++.h"
 #include <string.h>
 #include <ctype.h>
-#include "concat.h"
 #include "io_stream.h"
 #include <iostream>
-#include <strstream>
+#include <sstream>
 #include <string>
 
 using namespace std;
@@ -57,10 +56,10 @@ String::~String ()
 
 String::String (int const anInt)
 {
-  ostrstream os;
+  ostringstream os;
   os << anInt;
-  theData = new _data(os.pcount());
-  memcpy (theData->theString, os.str(), os.pcount());
+  theData = new _data(os.str().size());
+  memcpy (theData->theString, os.str().c_str(), os.str().size());
 }
 
 String::String (string const &aString) : theData (new _data (aString.c_str() ? strlen (aString.c_str()) : 0))
This page took 0.025075 seconds and 5 git commands to generate.