diff --git a/Base/Util/StringUtil.cpp b/Base/Util/StringUtil.cpp index 5c4272d0c3aac1178de3385b83ca9785a3861851..2bd483cd26b8d0ff50ef63bc8c2f75c6dda91421 100644 --- a/Base/Util/StringUtil.cpp +++ b/Base/Util/StringUtil.cpp @@ -22,10 +22,15 @@ //! Returns token vector obtained by splitting string at delimiters. std::vector<std::string> Base::String::split(const std::string& text, const std::string& delimiter) { - if (text.empty()) - return {}; std::vector<std::string> result; - boost::split(result, text, boost::is_any_of(delimiter)); + size_t pos = 0; + while (pos != std::string::npos) { + size_t next_pos = text.find(delimiter, pos); + result.push_back(text.substr(pos, next_pos - pos)); + if (next_pos == std::string::npos) + break; + pos = next_pos + delimiter.length(); + } return result; }