Steven Schveighoffer wrote:
a function that takes a char[] can also take a dchar[] if it is sent through a converter (i.e. toUtf8 on Tango I think).

In Phobos, there are text, wtext, and dtext in std.conv:

/**
   Convenience functions for converting any number and types of
   arguments into _text (the three character widths).

   Example:
   ----
   assert(text(42, ' ', 1.5, ": xyz") == "42 1.5: xyz");
   assert(wtext(42, ' ', 1.5, ": xyz") == "42 1.5: xyz"w);
   assert(dtext(42, ' ', 1.5, ": xyz") == "42 1.5: xyz"d);
   ----
*/

Ali

Reply via email to