mirror of
https://github.com/sam-astro/Z-Sharp.git
synced 2025-12-13 09:02:10 +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] != '\"')
|
if (str[0] != '\"')
|
||||||
withoutQuotes += str[0];
|
withoutQuotes += str[0];
|
||||||
|
|
||||||
for (int ch = 1; ch < (int)str.size() - 1; ch++)
|
withoutQuotes += str.substr(1, str.size()-2);
|
||||||
withoutQuotes += str[ch];
|
|
||||||
|
|
||||||
if (str[str.size() - 1] != '\"')
|
if (str[str.size() - 1] != '\"')
|
||||||
withoutQuotes += str[str.size() - 1];
|
withoutQuotes += str[str.size() - 1];
|
||||||
@ -72,8 +71,7 @@ string RMParenthesis(string str)
|
|||||||
if (str[0] != '(')
|
if (str[0] != '(')
|
||||||
withoutParenthesis += str[0];
|
withoutParenthesis += str[0];
|
||||||
|
|
||||||
for (int ch = 1; ch < (int)str.size() - 1; ch++)
|
withoutParenthesis += str.substr(1, str.size()-2);
|
||||||
withoutParenthesis += str[ch];
|
|
||||||
|
|
||||||
if (str[str.size() - 1] != ')')
|
if (str[str.size() - 1] != ')')
|
||||||
withoutParenthesis += str[str.size() - 1];
|
withoutParenthesis += str[str.size() - 1];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user