fixed unlisted bug in documentation

This commit is contained in:
Andrei Alexandrescu 2009-07-11 18:59:26 +00:00
parent 55540d9286
commit ecd5a1de11

View file

@ -2131,10 +2131,10 @@ import std.format;
string myFormat(A...)(A args) string myFormat(A...)(A args)
{ {
StringWriter!(char) writer; Appender!(string) writer;
std.format.formattedWrite(writer, std.format.formattedWrite(writer,
"%s et %s numeris romanis non sunt", args); "%s et %s numeris romanis non sunt", args);
return writer.backend; return writer.data;
} }
... ...
int x = 42; int x = 42;
@ -2146,9 +2146,9 @@ opengroup.org/onlinepubs/009695399/functions/printf.html, POSIX)
style. Example: style. Example:
------------------------- -------------------------
StringWriter!(char) writer; Appender!(string) writer;
std.format.formattedWrite(writer, "Date: %2$s %1$s", "October", 5); std.format.formattedWrite(writer, "Date: %2$s %1$s", "October", 5);
assert(writer.backend == "Date: 5 October"); assert(writer.data == "Date: 5 October");
------------------------ ------------------------
The positional and non-positional styles can be mixed in the same The positional and non-positional styles can be mixed in the same