diff --git a/Common/onelab.h b/Common/onelab.h index 1b9c24a57dd58ba305cf2690593085f41e00c6c9..01556ea67a2095e68d9e25d8cac23581e4cf8eae 100644 --- a/Common/onelab.h +++ b/Common/onelab.h @@ -140,7 +140,12 @@ namespace onelab{ std::string::size_type last = _name.find_last_of('/'); if(last != std::string::npos) s = _name.substr(last + 1); - // remove starting numbers + // remove starting braces: can be used to order parameters 'from the end', + // as the ASCII code is after numbers and letters + while(s.size() && (s[0] == '}' || s[0] == '{' || s[0] == '{')) + s = s.substr(1); + // remove starting numbers: can be used to order parameters 'from the + // start' while(s.size() && s[0] >= '0' && s[0] <= '9') s = s.substr(1); return s;