Snes9x - Use helper function. (#860)

This commit is contained in:
bladeoner 2019-06-07 04:30:14 +02:00 committed by dborth
parent fee3081a05
commit c774b82786

View File

@ -47,7 +47,7 @@ static std::string trim(std::string str)
for (start = 0; str[start] && start != (int)str.length() && isblank(str[start]); start++) {} for (start = 0; str[start] && start != (int)str.length() && isblank(str[start]); start++) {}
if (start >= (int)str.length()) if (start >= (int)str.length())
return std::string(""); return std::string("");
for (end = str.length() - 1; isblank(str[end]) || str[end] == '\n' || str[end] == '\r'; end--) {} for (end = str.length() - 1; isblankorlf(str[end]); end--) {}
return str.substr(start, end - start + 1); return str.substr(start, end - start + 1);
} }