diff --git a/doc/api.rst b/doc/api.rst index 711d3109..29988606 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -156,19 +156,6 @@ Compatibility .. doxygentypedef:: fmt::string_view -Locale ------- - -All formatting is locale-independent by default. Use the ``'L'`` format -specifier to insert the appropriate number separator characters from the -locale:: - - #include - #include - - std::locale::global(std::locale("en_US.UTF-8")); - auto s = fmt::format("{:L}", 1000000); // s == "1,000,000" - .. _format-api: Format API @@ -404,6 +391,23 @@ normally don't do any allocations for built-in and string types except for non-default floating-point formatting that occasionally falls back on ``sprintf``. +Locale +------ + +All formatting is locale-independent by default. Use the ``'L'`` format +specifier to insert the appropriate number separator characters from the +locale:: + + #include + #include + + std::locale::global(std::locale("en_US.UTF-8")); + auto s = fmt::format("{:L}", 1000000); // s == "1,000,000" + +.. doxygenfunction:: format(const Locale& loc, format_string fmt, T&&... args) -> std::string +.. doxygenfunction:: format_to(OutputIt out, const Locale& loc, format_string fmt, T&&... args) -> OutputIt +.. doxygenfunction:: formatted_size(const Locale& loc, format_string fmt, T&&... args) -> size_t + .. _ranges-api: Range and Tuple Formatting