37 std::string indent_ = std::string(
"\n");
40 bool one_line =
false;
41 while ((token = str.find_first_of(
"<>,", token)) != std::string::npos) {
42 size_t size = str.size();
43 size_t close, open, comma;
47 close = str.find(
">", token+1);
48 open = str.find(
"<", token+1);
49 comma = str.find(
",", token+1);
50 one_line = !(close > open) && !(comma < close);
56 str.insert(token + 1, indent_);
61 indent_.erase(indent_.size() -
indent.size());
62 str.insert(token, indent_);
67 token += 1 + str.size() - size;
69 const size_t nw = str.find_first_not_of(
" ", token);
70 if(nw != std::string::npos) {
71 str.erase(token, nw-token);