5 #include <boost/algorithm/string/replace.hpp>
14 boost::algorithm::replace_all(str,
"/",
"_");
15 boost::algorithm::replace_all(str,
"+",
"@");
16 boost::algorithm::replace_all(str,
" ",
".");
22 boost::algorithm::replace_all(str,
"_",
"/");
23 boost::algorithm::replace_all(str,
"@",
"+");
24 boost::algorithm::replace_all(str,
".",
" ");
31 std::ifstream is(filename.c_str());
33 if (! std::getline(is, line))
35 const std::string msg =
"UsiFile::UsiFile file cannot read ";
36 std::cerr << msg << filename <<
"\n";
40 assert(record.record.initial_state.isConsistent());
UsiFile(const std::string &filename)
void unescape(std::string &str)
escapeされた文字を元に戻す.
void parse(const std::string &line, NumEffectState &)
[sfen <sfenstring> | startpos ] moves <move1> ...
void escape(std::string &str)
URIやFile systemとして使えるように、文字をescape.