double nl_convert_base_t::get_sp_val(const pstring &sin) { std::size_t p = 0; while (p < sin.length() && (m_numberchars.find(sin.substr(p, 1)) != pstring::npos)) ++p; pstring val = plib::left(sin, p); pstring unit = sin.substr(p); double ret = get_sp_unit(unit) * plib::pstonum<double, true>(val); return ret; }
double nl_convert_base_t::get_sp_val(const pstring &sin) { std::size_t p = 0; while (p < sin.length() && (m_numberchars.find(sin.substr(p, 1)) != pstring::npos)) ++p; pstring val = sin.left(p); pstring unit = sin.substr(p); double ret = get_sp_unit(unit) * val.as_double(); return ret; }