BoostまたはSTLのQStringListに代わるものはありますか?私が達成したいのは、パスを分割することです。dvb://1.2.3.4/launchpad/dyn/index.htmは、QStringリストで簡単に実行できるように文字列を分離します。
QStringList path = objectPath.split(QChar('/'), QString::SkipEmptyParts);
ありがとうございました。
boost::split
std::vector<std::string>
1つまたは複数の区切り文字に基づいて、文字列をに分割できます。
#include <vector>
#include <string>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/split.hpp>
std::vector<std::string> path_parts;
std::string s("some/file/path");
boost::split(path_parts, s, boost::is_any_of("/"));