Author: dmacvicar Date: Mon May 7 16:54:50 2007 New Revision: 5509 URL: http://svn.opensuse.org/viewcvs/zypp?rev=5509&view=rev Log: r5205@piscola: dmacvicar | 2007-05-07 15:37:43 +0200 add dumpRegexpResults here Modified: trunk/ (props changed) trunk/libzypp/zypp/base/String.h Modified: trunk/libzypp/zypp/base/String.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/base/String.h?rev=5509&r1=5508&r2=5509&view=diff ============================================================================== --- trunk/libzypp/zypp/base/String.h (original) +++ trunk/libzypp/zypp/base/String.h Mon May 7 16:54:50 2007 @@ -90,6 +90,19 @@ using boost::wsmatch; //@} + /** + * helper to debug regular expressions matches + */ + std::ostream & dumpRegexpResult( const boost::smatch &what, std::ostream & str ) + { + for ( unsigned int k=0; k < what.size(); k++) + { + str << "[match "<< k << "] [" << what[k] << "]" << std::endl; + } + + return str; + } + /////////////////////////////////////////////////////////////////// /** \name String representation of number. * @@ -324,7 +337,7 @@ inline std::string stripPrefix( const std::string & str_r, const std::string & prefix_r ) { return( hasPrefix( str_r, prefix_r ) ? str_r.substr( prefix_r.size() ) : str_r ); } //@} - + ///////////////////////////////////////////////////////////////// } // namespace str /////////////////////////////////////////////////////////////////// -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org