add string accessor for Regex
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 3 Mar 2009 10:34:00 +0000 (11:34 +0100)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 3 Mar 2009 10:34:00 +0000 (11:34 +0100)
zypp/base/Regex.h

index 80f0ba1..a6fe0f6 100644 (file)
@@ -72,6 +72,12 @@ namespace zypp
       regex & operator=(const regex & rhs)
       { assign(rhs.m_str, rhs.m_flags); return *this; }
 
+      /**
+       * string representation of the regular expression
+       */
+      std::string asString() const
+      { return m_str; }
+
     public:
       /** Expert backdoor. Returns pointer to the compiled regex for direct use in regexec() */
       regex_t * get()