]> cygwin.com Git - cygwin-apps/setup.git/blobdiff - String++.cc
2002-05-04 Robert Collins <rbtcollins@hotmail.com>
[cygwin-apps/setup.git] / String++.cc
index eb0952dba486c1b4f056d0291b931855cf313819..e2e9cf5b00e49b1cc159f9ef1ddc702aa8469c77 100644 (file)
@@ -21,6 +21,7 @@
 #include "concat.h"
 #include "io_stream.h"
 #include <iostream>
+#include <strstream>
 
 // _data
 
@@ -51,6 +52,14 @@ String::~String ()
     delete theData;
 }
 
+String::String (int const anInt)
+{
+  ostrstream os;
+  os << anInt;
+  theData = new _data(os.pcount());
+  memcpy (theData->theString, os.str(), os.pcount());
+}
+
 // able to cache the result if needed.
 char *
 String::cstr ()
This page took 0.020804 seconds and 5 git commands to generate.