| 78 | } |
| 79 | |
| 80 | void SplitString(std::vector<std::string>& tokens, const std::string& str, const std::string& delimiters /* = " "*/, |
| 81 | bool trim_empty_str /* = true*/) |
| 82 | { |
| 83 | std::string::size_type pos = 0, new_pos = 0, last_pos = 0; |
| 84 | while (pos != std::string::npos) |
| 85 | { |
| 86 | pos = str.find_first_of(delimiters, last_pos); |
| 87 | new_pos = (pos == std::string::npos ? str.length() : pos); |
| 88 | if (new_pos != last_pos || !trim_empty_str) |
| 89 | { |
| 90 | tokens.push_back(str.substr(last_pos, new_pos - last_pos)); |
| 91 | } |
| 92 | last_pos = new_pos + 1; |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | // ref: enum_base in pybind11.h |
| 97 | py::handle static_property = py::handle((PyObject*)py::detail::get_internals().static_property_type); |
no outgoing calls
no test coverage detected