Skip to content
Snippets Groups Projects
Commit 8c3ee278 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

remove leading white space in GetShortName

parent ffcf60e9
No related branches found
No related tags found
No related merge requests found
...@@ -140,9 +140,12 @@ namespace onelab{ ...@@ -140,9 +140,12 @@ namespace onelab{
std::string::size_type last = _name.find_last_of('/'); std::string::size_type last = _name.find_last_of('/');
if(last != std::string::npos) if(last != std::string::npos)
s = _name.substr(last + 1); s = _name.substr(last + 1);
// remove starting white space
while(s.size() && s[0] == ' ')
s = s.substr(1);
// remove starting braces: can be used to order parameters 'from the end', // remove starting braces: can be used to order parameters 'from the end',
// as the ASCII code is after numbers and letters // as the ASCII code is after numbers and letters
while(s.size() && (s[0] == '}' || s[0] == '{' || s[0] == '{')) while(s.size() && (s[0] == '}' || s[0] == '{'))
s = s.substr(1); s = s.substr(1);
// remove starting numbers: can be used to order parameters 'from the // remove starting numbers: can be used to order parameters 'from the
// start' // start'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment