Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
8cab5909
Commit
8cab5909
authored
Oct 09, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve PDF output
parent
80f5cbb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
doc/conf.py
doc/conf.py
+1
-1
doc/index.rst
doc/index.rst
+9
-9
No files found.
doc/conf.py
View file @
8cab5909
...
@@ -202,7 +202,7 @@ latex_elements = {
...
@@ -202,7 +202,7 @@ latex_elements = {
# Grouping the document tree into LaTeX files. List of tuples
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents
=
[
latex_documents
=
[
(
'index'
,
'format.tex'
,
u'
f
ormat Documentation'
,
(
'index'
,
'format.tex'
,
u'
C++ F
ormat Documentation'
,
u'Victor Zverovich'
,
'manual'
),
u'Victor Zverovich'
,
'manual'
),
]
]
...
...
doc/index.rst
View file @
8cab5909
.. highlight:: c++
.. highlight:: c++
.. _string-formatting-api:
Usage
Usage
-----
=====
To use the C++ Format library, add ``format.h`` and ``format.cc`` from
To use the C++ Format library, add ``format.h`` and ``format.cc`` from
a `release archive <https://github.com/cppformat/cppformat/releases/latest>`_
a `release archive <https://github.com/cppformat/cppformat/releases/latest>`_
...
@@ -18,15 +16,17 @@ the line
...
@@ -18,15 +16,17 @@ the line
before other includes in ``format.cc``.
before other includes in ``format.cc``.
.. _string-formatting-api:
C++ Format Library API
C++ Format Library API
----------------------
======================
All functions and classes provided by the C++ Format library reside
All functions and classes provided by the C++ Format library reside
in namespace ``fmt`` and macros have prefix ``FMT_``. For brevity the
in namespace ``fmt`` and macros have prefix ``FMT_``. For brevity the
namespace is usually omitted in examples.
namespace is usually omitted in examples.
Formatting functions
Formatting functions
^^^^^^^^^^^^^^^^^^^^
--------------------
The following functions use `format string syntax`_ similar to the one
The following functions use `format string syntax`_ similar to the one
used by Python's `str.format
used by Python's `str.format
...
@@ -52,7 +52,7 @@ arguments in the resulting string.
...
@@ -52,7 +52,7 @@ arguments in the resulting string.
.. doxygenfunction:: fmt::print(std::ostream &, StringRef, ArgList)
.. doxygenfunction:: fmt::print(std::ostream &, StringRef, ArgList)
Printf formatting functions
Printf formatting functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
---------------------------
The following functions use `printf format string syntax
The following functions use `printf format string syntax
<http://pubs.opengroup.org/onlinepubs/009695399/functions/fprintf.html>`_ with
<http://pubs.opengroup.org/onlinepubs/009695399/functions/fprintf.html>`_ with
...
@@ -128,7 +128,7 @@ allocator::
...
@@ -128,7 +128,7 @@ allocator::
FMT_VARIADIC(CustomString, format, CustomAllocator, fmt::StringRef)
FMT_VARIADIC(CustomString, format, CustomAllocator, fmt::StringRef)
Format String Syntax
Format String Syntax
--------------------
====================
Formatting functions such as :ref:`fmt::format() <format>` and :ref:`fmt::print() <print>`
Formatting functions such as :ref:`fmt::format() <format>` and :ref:`fmt::print() <print>`
use the same format string syntax described in this section.
use the same format string syntax described in this section.
...
@@ -183,7 +183,7 @@ See the :ref:`formatexamples` section for some examples.
...
@@ -183,7 +183,7 @@ See the :ref:`formatexamples` section for some examples.
.. _formatspec:
.. _formatspec:
Format Specification Mini-Language
Format Specification Mini-Language
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
----------------------------------
"Format specifications" are used within replacement fields contained within a
"Format specifications" are used within replacement fields contained within a
format string to define how individual values are presented (see
format string to define how individual values are presented (see
...
@@ -416,7 +416,7 @@ The available presentation types for pointers are:
...
@@ -416,7 +416,7 @@ The available presentation types for pointers are:
.. _formatexamples:
.. _formatexamples:
Format examples
Format examples
^^^^^^^^^^^^^^^
---------------
This section contains examples of the format syntax and comparison with
This section contains examples of the format syntax and comparison with
the printf formatting.
the printf formatting.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment