| 160 | } |
| 161 | |
| 162 | std::optional<long> OHDUtil::string_to_long_hex(const std::string& s) { |
| 163 | if (!contains(s, "0x")) return std::nullopt; |
| 164 | try { |
| 165 | auto ret = std::stol(s, 0, 16); |
| 166 | return ret; |
| 167 | } catch (...) { |
| 168 | openhd::log::get_default()->warn("Cannot convert [{}] to long (hex)", s); |
| 169 | return std::nullopt; |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | std::vector<std::string> OHDUtil::split_into_substrings( |
| 174 | const std::string& input, const char separator) { |
nothing calls this directly
no test coverage detected