14 inline bool cstr2string(
const char* cstr,
int cstr_size, std::string& str)
21 valtemp.append(cstr, cstr_size);
22 d = valtemp.find_first_not_of(
' ');
23 f = valtemp.find_last_not_of (
' ');
24 str = valtemp.substr(d, f - d + 1);
32 inline bool string_copy(
const std::string& str,
char* cstr,
int cstr_size)
34 if (str.size() > cstr_size)
38 std::fill(cstr, cstr + cstr_size,
' ');
39 str.copy(cstr, cstr_size);
44 #endif // __ICUTIL_HPP__
ifstream f(fileToReadWrite_.c_str())
bool string_copy(const std::string &str, char *cstr, int cstr_size)
bool cstr2string(const char *cstr, int cstr_size, std::string &str)