mirror of
https://github.com/sam-astro/Z-Sharp.git
synced 2025-12-11 16:22:12 +00:00
Removed for loops in place of .substr()
This commit is contained in:
parent
392879fbad
commit
f796358af6
@ -38,8 +38,7 @@ string StringRaw(string str)
|
||||
if (str[0] != '\"')
|
||||
withoutQuotes += str[0];
|
||||
|
||||
for (int ch = 1; ch < (int)str.size() - 1; ch++)
|
||||
withoutQuotes += str[ch];
|
||||
withoutQuotes += str.substr(1, str.size()-2);
|
||||
|
||||
if (str[str.size() - 1] != '\"')
|
||||
withoutQuotes += str[str.size() - 1];
|
||||
@ -72,8 +71,7 @@ string RMParenthesis(string str)
|
||||
if (str[0] != '(')
|
||||
withoutParenthesis += str[0];
|
||||
|
||||
for (int ch = 1; ch < (int)str.size() - 1; ch++)
|
||||
withoutParenthesis += str[ch];
|
||||
withoutParenthesis += str.substr(1, str.size()-2);
|
||||
|
||||
if (str[str.size() - 1] != ')')
|
||||
withoutParenthesis += str[str.size() - 1];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user