refactor(Core/Misc): add braces and impove codestyle (#6402)

This commit is contained in:
Kargatum
2021-06-25 00:50:18 +07:00
committed by GitHub
parent 33c271cc7c
commit 3c24b511f2
72 changed files with 1486 additions and 401 deletions

View File

@@ -13,13 +13,17 @@ std::vector<std::string_view> Acore::Tokenize(std::string_view str, char sep, bo
for (size_t end = str.find(sep); end != std::string_view::npos; end = str.find(sep, start))
{
if (keepEmpty || (start < end))
{
tokens.push_back(str.substr(start, end - start));
}
start = end + 1;
}
if (keepEmpty || (start < str.length()))
{
tokens.push_back(str.substr(start));
}
return tokens;
}