MCPcopy Create free account
hub / github.com/JeremyBYU/polylidar / SplitString

Function SplitString

src/Python/polylidar_pybind/docstring/docstring.cpp:80–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void 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
97py::handle static_property = py::handle((PyObject*)py::detail::get_internals().static_property_type);

Callers 2

ToGoogleDocStringMethod · 0.85
ToMarkdownDocStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected