{
std::string result("");
std::string edt_value = maximum_duration;
+ std::size_t pos = edt_value.find(":");
+
if (edt_value != "") {
- std::string begin_edt_value = edt_value.substr(0, 2);
- std::string mid_edt_value = edt_value.substr(2, 1);
- std::string end_edt_value = edt_value.substr(3);
+ std::string begin_edt_value = edt_value.substr(0, pos);
+ std::string mid_edt_value = edt_value.substr(pos, 1);
+ std::string end_edt_value = edt_value.substr(pos + 1, edt_value.npos);
long value;
std::istringstream iss(begin_edt_value);