7 #ifndef IFM3D_DEVICE_UTIL_H
8 #define IFM3D_DEVICE_UTIL_H
11 #include <ifm3d/device/module_device.h>
25 IFM3D_EXPORT std::string& ltrim(std::string& str,
26 const std::string& chars =
"\t\n\v\f\r ");
31 IFM3D_EXPORT std::string& rtrim(std::string& str,
32 const std::string& chars =
"\t\n\v\f\r ");
37 IFM3D_EXPORT std::string& trim(std::string& str,
38 const std::string& chars =
"\t\n\v\f\r ");
43 IFM3D_EXPORT std::vector<std::string> split(
const std::string& in,
46 IFM3D_EXPORT std::string base64_encode(
47 const std::vector<std::uint8_t>& data);
49 IFM3D_EXPORT std::vector<std::uint8_t> base64_decode(
50 const std::string& base64);
52 IFM3D_EXPORT
void check_http_result(httplib::Result
const& res);
54 IFM3D_EXPORT
bool is_stdin_available(
int timeout_seconds = 2);