Fixed a trim-related bug in ostd::String::tokenize

This commit is contained in:
OmniaX 2024-09-02 05:54:44 +02:00
parent b50bd53c0d
commit d81b8a1d99
2 changed files with 3 additions and 3 deletions

View file

@ -1 +1 @@
1862
1864

View file

@ -539,7 +539,7 @@ namespace ostd
{
if (allow_white_space_only_tokens && __token != "")
tokens.m_tokens.push_back(__token.cpp_str());
else if (!allow_white_space_only_tokens && __token.trim() != "")
else if (!allow_white_space_only_tokens && __token.new_trim() != "")
tokens.m_tokens.push_back(__token.cpp_str());
}
sindex = eindex + delimiter.len();
@ -555,7 +555,7 @@ namespace ostd
{
if (allow_white_space_only_tokens && __token != "")
tokens.m_tokens.push_back(__token.cpp_str());
else if (!allow_white_space_only_tokens && __token.trim() != "")
else if (!allow_white_space_only_tokens && __token.new_trim() != "")
tokens.m_tokens.push_back(__token.cpp_str());
}
return tokens;