Fixed: trimQuotes
--HG-- branch : develop
This commit is contained in:
parent
6a8b3a342d
commit
e6aa13258b
1 changed files with 4 additions and 2 deletions
|
@ -282,9 +282,11 @@ template <class T> T trimQuotes (const T &str)
|
||||||
typename T::size_type size = str.size();
|
typename T::size_type size = str.size();
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
return str;
|
return str;
|
||||||
if (str[0] != str[size-1] && (str[0] != '"' || str[0] != '\''))
|
if (str[0] != str[size-1])
|
||||||
return str;
|
return str;
|
||||||
return str.substr(1, size - 1);
|
if (str[0] != '"' && str[0] != '\'')
|
||||||
|
return str;
|
||||||
|
return str.substr(1, size - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in a new issue