 |
Changeset 3776
- 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
| r3691 |
r3776 |
|
| 28 | 28 | |
|---|
| 29 | 29 | private import tango.core.Exception; |
|---|
| | 30 | |
|---|
| | 31 | private import tango.io.model.IConduit : OutputStream; |
|---|
| 30 | 32 | |
|---|
| 31 | 33 | private import Utf = tango.text.convert.Utf; |
|---|
| … | … | |
| 144 | 146 | { |
|---|
| 145 | 147 | 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); |
|---|
| 146 | 157 | } |
|---|
| 147 | 158 | |
|---|
| … | … | |
| 901 | 912 | auto layout = new Layout!(char); |
|---|
| 902 | 913 | |
|---|
| | 914 | layout.convert (Cout.stream, "hi {}", "there\n"); |
|---|
| | 915 | |
|---|
| 903 | 916 | Cout (layout.sprint (new char[1], "hi")).newline; |
|---|
| 904 | 917 | Cout (layout.sprint (new char[10], "{.4}", "hello")).newline; |
|---|
Download in other formats:
|
 |
 |
|
 |
Copyright © 2006-2008 Tango. All Rights Reserved. | Page Width:
Static or
Dynamic