refactor(Core/Misc): add braces and impove codestyle (#6402)
This commit is contained in:
parent
33c271cc7c
commit
3c24b511f2
72 changed files with 1486 additions and 401 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue