string stream improvements
authorMichael Andres <ma@suse.de>
Thu, 10 Apr 2014 17:13:33 +0000 (19:13 +0200)
committerMichael Andres <ma@suse.de>
Thu, 10 Apr 2014 17:13:33 +0000 (19:13 +0200)
zypp/base/String.h

index f32e28a..9145e90 100644 (file)
@@ -226,9 +226,15 @@ namespace zypp
       std::ostream & stream()
       { return _str; }
 
+      void clear()
+      { _str.str( std::string() ); }
+
       std::ostringstream _str;
     };
 
+    inline std::ostream & operator<<( std::ostream & str, const Str & obj )
+    { return str << (std::string)obj; }
+
     ///////////////////////////////////////////////////////////////////
     /** \name String representation of number.
      *