HepPDT Reference Documentation

HepPDT

stringtodouble.cc

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------
00002 //
00003 // stringtodouble.cc
00004 // Author: Lynn Garren
00005 //
00006 // ----------------------------------------------------------------------
00007 
00008 #include <sstream>
00009 
00010 #include "HepPDT/defs.h"
00011 #include "HepPDT/stringtodouble.hh"
00012 
00013 namespace HepPDT {
00014 
00015 double stringtodouble( std::string & numb )
00016 {
00017     double dn;
00018     int sl = numb.length();
00019     std::istringstream snum( numb.substr(0,sl).c_str() );
00020     snum >> dn;
00021     return dn;
00022 }
00023 
00024 }  // namespace HepPDT

Generated on Fri Dec 4 14:05:24 2009 for HepPDT by  doxygen 1.4.7