Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3776

Show
Ignore:
Timestamp:
07/20/08 19:23:02 (5 months ago)
Author:
kris
Message:

added a tentative convert(OutputStream?) variation. This imports some of the IO subsystem (though only an interface), and thus break with tradition. May be removed ...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/text/convert/Layout.d

    r3691 r3776  
    2828 
    2929private import  tango.core.Exception; 
     30 
     31private import  tango.io.model.IConduit : OutputStream; 
    3032 
    3133private import  Utf = tango.text.convert.Utf; 
     
    144146        { 
    145147                return convert (sink, _arguments, _argptr, formatStr); 
     148        } 
     149 
     150        /********************************************************************** 
     151 
     152        **********************************************************************/ 
     153 
     154        public final uint convert (OutputStream output, T[] formatStr, ...) 
     155        { 
     156                return convert (cast(Sink) &output.write, _arguments, _argptr, formatStr); 
    146157        } 
    147158 
     
    901912                auto layout = new Layout!(char); 
    902913 
     914                layout.convert (Cout.stream, "hi {}", "there\n"); 
     915 
    903916                Cout (layout.sprint (new char[1], "hi")).newline; 
    904917                Cout (layout.sprint (new char[10], "{.4}", "hello")).newline;