]> git.tdb.fi Git - libs/core.git/blobdiff - source/regmatch.cpp
Move files around to prepare for assimilation into core
[libs/core.git] / source / regmatch.cpp
diff --git a/source/regmatch.cpp b/source/regmatch.cpp
deleted file mode 100644 (file)
index f81be1a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* $Id$
-
-This file is part of libmspstrings
-Copyright © 2007 Mikko Rasa
-Distributed under the LGPL
-*/
-
-#include <msp/core/except.h>
-#include "regmatch.h"
-
-using namespace std;
-
-namespace Msp {
-
-RegMatch::RegMatch(const string &str, const GroupArray &g):
-       groups(g)
-{
-       for(GroupArray::iterator i=groups.begin(); i!=groups.end(); ++i)
-               if(i->match)
-               {
-                       i->length = i->end-i->begin;
-                       i->str = str.substr(i->begin, i->length);
-               }
-}
-
-const RegMatch::Group &RegMatch::group(unsigned i) const
-{
-       if(i>=groups.size())
-               throw InvalidParameterValue("Group index out of range");
-       return groups[i];
-}
-
-} // namespace Msp