]> git.lyx.org Git - lyx.git/blobdiff - src/support/LRegex.C
ws cleanup
[lyx.git] / src / support / LRegex.C
index 1b6064abd78a9027fac64a8728fceb9df0c9908c..a82b6642301e3e666388108a78d20247b5a851d7 100644 (file)
@@ -20,40 +20,40 @@ using std::make_pair;
 struct LRegex::Impl {
        ///
        regex_t * preg;
-       
+
        ///
        int error_code;
-       
+
        ///
        mutable LRegex::SubMatches matches;
-       
+
        ///
-       Impl(string const & regex) 
+       Impl(string const & regex)
                : preg(new regex_t), error_code(0)
        {
                error_code = regcomp(preg, regex.c_str(), REG_EXTENDED);
        }
-       
+
        ///
        ~Impl()
        {
                regfree(preg);
                delete preg;
        }
-       
+
        ///
        bool exact_match(string const & str) const
        {
                regmatch_t tmp;
                if (!regexec(preg, str.c_str(), 1, &tmp, 0)) {
-                       if (tmp.rm_so == 0 && 
+                       if (tmp.rm_so == 0 &&
                            tmp.rm_eo == static_cast<signed int>(str.length()))
                                return true;
                }
                // no match
                return false;
        }
-       
+
        ///
        LRegex::MatchPair const first_match(string const & str) const
        {
@@ -65,7 +65,7 @@ struct LRegex::Impl {
                        tmp.rm_eo : string::npos;
                return make_pair(first, second - first);
        }
-       
+
        ///
        string const getError() const
        {
@@ -76,7 +76,7 @@ struct LRegex::Impl {
                delete [] tmp;
                return ret;
        }
-       
+
        ///
        LRegex::SubMatches const & exec(string const & str) const
        {