From 060184a306191c523676c1ffb7d1f93ca0e1035a Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 4 Jun 2015 13:38:14 +0000
Subject: [PATCH] hide { and } at begining of onelab parameter short name;
 allows to sort entries "from the end" (like numbers can help sorting entries
 "from the top"

---
 Common/onelab.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Common/onelab.h b/Common/onelab.h
index 1b9c24a57d..01556ea67a 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;
-- 
GitLab