Lines Matching refs:str
11 strip_trailing_zeros(string str)
13 string::size_type p_ix = str.find('.');
15 string::size_type e_ix = str.find('e', p_ix);
17 * Default to avoiding `e', e.g. using sprintf(str, "%17f", d). Add a new function that
20 string::size_type nz_ix = str.find_last_not_of('0', (e_ix == string::npos
26 str.erase(str.begin() + (nz_ix == p_ix
30 ? str.end()
31 : str.begin() + e_ix));
34 return str;