client/cpp/rappor_sim.cc
// Like atof, but with basic (not exhaustive) error checking.
Like atof, but with basic (not exhaustive) error checking.
Like atof but with basic ( not exhaustive ) error checking .
bool StringToFloat(const char* s, float* result) {
  bool ok = true;
  char* end;  
  *result = strtof(s, &end);
  if (end == s) {
    ok = false;
  }
  return ok;
}
bool StringToFloat ( const char * s , float * result ) { bool ok = true ; char * end ; * result = strtof ( s , & end ) ; if ( end == s ) { ok = false ; } return ok ; }
Like atof, but with basic (not exhaustive) error checking.
Like atof but with basic ( not exhaustive ) error checking .
// mutated by strtof // If strof didn't consume any characters, it failed.