ifm3d
util.h
1 // -*- c++ -*-
2 /*
3  * Copyright 2018 ifm electronic, gmbh
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef IFM3D_DEVICE_UTIL_H
8 #define IFM3D_DEVICE_UTIL_H
9 
10 #include <string>
11 #include <vector>
12 #include <ifm3d/device/module_device.h>
13 
14 namespace ifm3d
15 {
19  IFM3D_EXPORT std::string& ltrim(std::string& str,
20  const std::string& chars = "\t\n\v\f\r ");
21 
25  IFM3D_EXPORT std::string& rtrim(std::string& str,
26  const std::string& chars = "\t\n\v\f\r ");
27 
31  IFM3D_EXPORT std::string& trim(std::string& str,
32  const std::string& chars = "\t\n\v\f\r ");
33 
37  IFM3D_EXPORT std::vector<std::string> split(const std::string& in,
38  char delim);
39 
40  IFM3D_EXPORT bool IsStdinAvailable(int timeoutSeconds = 2);
41 
42 } // end: namespace ifm3d
43 
44 #endif // IFM3D_CAMERA_UTIL_H