Function convertText
Convert iopipe of one text type into an iopipe for another type. Performs conversions at the code-point level. If specified, the resulting iopipe will ensure there is a BOM at the beginning of the iopipe. This is useful if writing to storage.
auto convertText(Char, bool ensureBOM = false, Chain)
(
Chain chain
)
if (isSomeChar!Char);
If no conversion is necessary, and no BOM is required, the original iopipe is returned.
Parameters
Name | Description |
---|---|
Char | The desired character type in the resulting iopipe. Must be one of char, wchar, or dchar. |
ensureBOM | If true, the resulting iopipe will ALWAYS have a byte order mark at the beginning of the stream. At the moment this is accomplished by copying all the data from the original iopipe to the new one. A better mechanism is being worked on. |
chain | The source iopipe. |
Returns
An iopipe which fulfills the given requirements.