Fix copy/pasta in docs
authorSara Golemon <sgolemon@fb.com>
Wed, 24 Jun 2015 16:32:42 +0000 (09:32 -0700)
committerSara Golemon <sgolemon@fb.com>
Wed, 24 Jun 2015 16:41:06 +0000 (09:41 -0700)
Summary: svformat explicitly takes a container for direct indexing,
but the format string used is per-arg, which corresponds to format/sformat.

Closes #228

Reviewed By: @JoelMarcey

Differential Revision: D2184334

folly/docs/Format.md

index 74192058abc00c496fae81e0367c83feaeae1b6d..5e40bf5d2f611981767792e7a0170ce425820535 100644 (file)
@@ -63,7 +63,7 @@ std::cout << format("The only {0[what]} is {0[value]}", m);
 // And if you just want the string,
 std::string result = svformat("The only {what} is {value}", m);
 // => "The only answer is 42"
 // And if you just want the string,
 std::string result = svformat("The only {what} is {value}", m);
 // => "The only answer is 42"
-std::string result = svformat("The only {0[what]} is {0[value]}", m);
+std::string result = sformat("The only {0[what]} is {0[value]}", m);
 // => "The only answer is 42"
 
 // {} works for vformat too
 // => "The only answer is 42"
 
 // {} works for vformat too