Commit 70946519 authored by Victor Zverovich's avatar Victor Zverovich

Switch to bootstrap theme

parent 76a2ea56
......@@ -110,12 +110,25 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinxdoc'
html_theme = 'bootstrap'
html_theme_path = '.'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
html_theme_options = {
# HTML navbar class (Default: "navbar") to attach to <div>.
# For black navbar, do "navbar navbar-inverse"
#'navbar_class': "navbar navbar-inverse",
# Fix navigation bar to top of page?
# Values: "true" (default) or "false"
'navbar_fixed_top': "true",
# Location of link to source.
# Options are "nav" (default), "footer".
'source_link_position': "footer",
}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
......
This diff is collapsed.
.. highlight:: c++
.. _string-formatting-api:
*************
API Reference
*************
All functions and classes provided by the C++ Format library reside
in namespace ``fmt`` and macros have prefix ``FMT_``. For brevity the
namespace is usually omitted in examples.
Formatting functions
====================
The following functions use :ref:`format string syntax <syntax>` similar
to the one used by Python's `str.format
<http://docs.python.org/3/library/stdtypes.html#str.format>`_ function.
They take *format_str* and *args* as arguments.
*format_str* is a format string that contains literal text and replacement
fields surrounded by braces ``{}``. The fields are replaced with formatted
arguments in the resulting string.
*args* is an argument list representing arbitrary arguments.
.. _format:
.. doxygenfunction:: fmt::format(StringRef, ArgList)
.. _print:
.. doxygenfunction:: fmt::print(StringRef, ArgList)
.. doxygenfunction:: fmt::print(std::FILE *, StringRef, ArgList)
.. doxygenfunction:: fmt::print(std::ostream &, StringRef, ArgList)
Printf formatting functions
===========================
The following functions use `printf format string syntax
<http://pubs.opengroup.org/onlinepubs/009695399/functions/fprintf.html>`_ with
a POSIX extension for positional arguments.
.. doxygenfunction:: fmt::printf(StringRef, ArgList)
.. doxygenfunction:: fmt::fprintf(std::FILE *, StringRef, ArgList)
.. doxygenfunction:: fmt::sprintf(StringRef, ArgList)
Write API
=========
.. doxygenclass:: fmt::BasicWriter
:members:
.. doxygenclass:: fmt::BasicMemoryWriter
:members:
.. doxygenfunction:: fmt::bin
.. doxygenfunction:: fmt::oct
.. doxygenfunction:: fmt::hex
.. doxygenfunction:: fmt::hexu
.. doxygenfunction:: fmt::pad(int, unsigned, Char)
Utilities
=========
.. doxygendefine:: FMT_VARIADIC
.. doxygenclass:: fmt::ArgList
:members:
.. doxygenclass:: fmt::BasicStringRef
:members:
System Errors
=============
.. doxygenclass:: fmt::SystemError
:members:
.. doxygenclass:: fmt::WindowsError
:members:
.. _formatstrings:
Custom allocators
=================
The C++ Format library supports custom dynamic memory allocators.
A custom allocator class can be specified as a template argument to
:cpp:class:`fmt::BasicMemoryWriter`::
typedef fmt::BasicMemoryWriter<char, CustomAllocator> CustomMemoryWriter;
It is also possible to write a formatting function that uses a custom
allocator::
typedef std::basic_string<char, std::char_traits<char>, CustomAllocator> CustomString;
CustomString format(CustomAllocator alloc, fmt::StringRef format_str,
fmt::ArgList args) {
CustomMemoryWriter writer(alloc);
writer.write(format_str, args);
return CustomString(writer.data(), writer.size(), alloc);
}
FMT_VARIADIC(CustomString, format, CustomAllocator, fmt::StringRef)
This diff is collapsed.
......@@ -1560,7 +1560,7 @@ class BasicWriter {
The output can be accessed using :meth:`data`, :meth:`c_str` or :meth:`str`
methods.
See also `Format String Syntax`_.
See also :ref:`syntax`.
\endrst
*/
void write(BasicStringRef<Char> format, ArgList args) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment