Boost logo

Boost :

From: vonosan (alnsn_at_[hidden])
Date: 2001-12-13 03:50:39


Hello,
Is any interest of putting my formatter class into the boost library?
Below is a brief description of this class:

Class formatter is designed to format in ostream manner
with internationalization issues taken in mind.

First example:
  formatter fmt ( "reverse of (%0,%1,%2) is (%2,%1,%0)" );
  fmt << '0' << 1 << "two";
  assert ( fmt.str () == "reverse of (0,1,two) is (two,1,0)" );

Second example:
  formatter fmt ( "{12.5E%0}" );
  fmt << complex ( 0, 1 );
  string str = fmt.str ();

This code do such thing:
  ostringstream oss;
  oss << sew ( 12 )
      << setprecision ( 5 )
      << scientific
      << uppercase
      << complex ( 0, 1 );
  string str = oss.str ();

-----------------
Alexander Nasonov
a_l_n_s_n_at_m_a_i_l.ru (remove all _ characters)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk