Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:15

0001 /**
0002 
0003 ~/opticks/sysrap/tests/s_locale_test.sh
0004 
0005 **/
0006 
0007 #include <iostream>
0008 #include <iomanip>
0009 #include <locale>
0010 #include <string>
0011 #include <sstream>
0012 
0013 int main()
0014 {
0015     int v = 1000000000 ; 
0016 
0017     std::cout.imbue(std::locale(""));
0018     std::cout << std::setw(10) << v << std::endl;
0019 
0020     std::stringstream ss ;
0021     ss.imbue(std::locale("")) ;  // commas for thousands
0022     ss << std::setw(10) << v << std::endl; 
0023 
0024     std::string str = ss.str(); 
0025     std::cout << str ;  
0026 
0027 
0028     return 0 ; 
0029 }
0030