bool Selection::match (const std::string &test_string) const
{
std::string tmp(sequence);
- // remove whitespace at beginning
+
+// remove whitespace at beginning
while ((tmp.length() != 0) && (std::isspace (tmp[0])))
- tmp.erase (0,1);
+ tmp.erase (0,1); // check the different possibilities
- // check the different possibilities
while (tmp.find('|') != std::string::npos)
{
if (test_string == std::string(tmp, 0, tmp.find('|')))
tmp.erase (0, tmp.find('|')+1);
};
- //remove whitespace at the end
- while ((tmp.length() != 0) && (std::isspace (tmp[*(tmp.end()-1)])))
+//remove whitespace at the end
+ while ((tmp.length() != 0) && (std::isspace (*(tmp.end()-1))))
tmp.erase (tmp.end()-1);
- // check last choice, not finished by |
+// check last choice, not finished by |
if (test_string == tmp)
return true;
# ---------------------
subsection Testing
# docs 3
- set double = 3.1415926
- set int = 3 # default: 1
+ set double = 3.1415926
+ set int = 3 # default: 1
# docs 1
set string list1 = a, b, c # default: a
- #docs 2
+
+ # docs 2
set string list2 = h, b, c # default: h
end