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
1a166b0e
Commit
1a166b0e
authored
Mar 10, 2016
by
vitaut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs
parent
38275fb2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
16 deletions
+29
-16
README.rst
README.rst
+11
-11
doc/_templates/layout.html
doc/_templates/layout.html
+1
-0
doc/api.rst
doc/api.rst
+9
-4
doc/build.py
doc/build.py
+3
-1
doc/cppformat.less
doc/cppformat.less
+5
-0
No files found.
README.rst
View file @
1a166b0e
...
@@ -28,9 +28,9 @@ Features
...
@@ -28,9 +28,9 @@ Features
* Format API with `format string syntax
* Format API with `format string syntax
<http://cppformat.github.io/latest/syntax.html>`_
<http://cppformat.github.io/latest/syntax.html>`_
similar to the one used by `str.format
similar to the one used by `str.format
<http://docs.python.org/2/library/stdtypes.html#str.format>`_ in Python.
<http
s
://docs.python.org/2/library/stdtypes.html#str.format>`_ in Python.
* Safe `printf implementation
* Safe `printf implementation
<http://cppformat.github.io/latest/
reference
.html#printf-formatting-functions>`_
<http://cppformat.github.io/latest/
api
.html#printf-formatting-functions>`_
including the POSIX extension for positional arguments.
including the POSIX extension for positional arguments.
* Support for user-defined types.
* Support for user-defined types.
* High speed: performance of the format API is close to that of
* High speed: performance of the format API is close to that of
...
@@ -103,10 +103,10 @@ An object of any user-defined type for which there is an overloaded
...
@@ -103,10 +103,10 @@ An object of any user-defined type for which there is an overloaded
// s == "The date is 2012-12-9"
// s == "The date is 2012-12-9"
You can use the `FMT_VARIADIC
You can use the `FMT_VARIADIC
<http://cppformat.github.io/latest/
reference
.html#utilities>`_
<http://cppformat.github.io/latest/
api
.html#utilities>`_
macro to create your own functions similar to `format
macro to create your own functions similar to `format
<http://cppformat.github.io/latest/
reference
.html#format>`_ and
<http://cppformat.github.io/latest/
api
.html#format>`_ and
`print <http://cppformat.github.io/latest/
reference
.html#print>`_
`print <http://cppformat.github.io/latest/
api
.html#print>`_
which take arbitrary arguments:
which take arbitrary arguments:
.. code:: c++
.. code:: c++
...
@@ -132,10 +132,10 @@ Projects using this library
...
@@ -132,10 +132,10 @@ Projects using this library
* `AMPL/MP <https://github.com/ampl/mp>`_:
* `AMPL/MP <https://github.com/ampl/mp>`_:
An open-source library for mathematical programming
An open-source library for mathematical programming
* `HarpyWar/pvpgn <https://github.com/
HarpyWar/pvpgn
>`_:
* `HarpyWar/pvpgn <https://github.com/
pvpgn/pvpgn-server
>`_:
Player vs Player Gaming Network with tweaks
Player vs Player Gaming Network with tweaks
* `KBEngine <http://
www.
kbengine.org/>`_: An open-source MMOG server engine
* `KBEngine <http://kbengine.org/>`_: An open-source MMOG server engine
* `Lifeline <https://github.com/peter-clark/lifeline>`_: A 2D game
* `Lifeline <https://github.com/peter-clark/lifeline>`_: A 2D game
...
@@ -148,7 +148,7 @@ Projects using this library
...
@@ -148,7 +148,7 @@ Projects using this library
* `redis-cerberus <https://github.com/HunanTV/redis-cerberus>`_: A Redis cluster proxy
* `redis-cerberus <https://github.com/HunanTV/redis-cerberus>`_: A Redis cluster proxy
* `Saddy <https://
code.google.com/p/saddy/
>`_:
* `Saddy <https://
github.com/mamontov-cpp/saddy-graphics-engine-2d
>`_:
Small crossplatform 2D graphic engine
Small crossplatform 2D graphic engine
* `Salesforce Analytics Cloud <http://www.salesforce.com/analytics-cloud/overview/>`_:
* `Salesforce Analytics Cloud <http://www.salesforce.com/analytics-cloud/overview/>`_:
...
@@ -188,7 +188,7 @@ doesn't support user-defined types. Printf also has safety issues although
...
@@ -188,7 +188,7 @@ doesn't support user-defined types. Printf also has safety issues although
they are mostly solved with `__attribute__ ((format (printf, ...))
they are mostly solved with `__attribute__ ((format (printf, ...))
<http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html>`_ in GCC.
<http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html>`_ in GCC.
There is a POSIX extension that adds positional arguments required for
There is a POSIX extension that adds positional arguments required for
`i18n <http://en.wikipedia.org/wiki/Internationalization_and_localization>`_
`i18n <http
s
://en.wikipedia.org/wiki/Internationalization_and_localization>`_
to printf but it is not a part of C99 and may not be available on some
to printf but it is not a part of C99 and may not be available on some
platforms.
platforms.
...
@@ -376,7 +376,7 @@ C++ Format is distributed under the BSD `license
...
@@ -376,7 +376,7 @@ C++ Format is distributed under the BSD `license
The `Format String Syntax
The `Format String Syntax
<http://cppformat.github.io/latest/syntax.html>`_
<http://cppformat.github.io/latest/syntax.html>`_
section in the documentation is based on the one from Python `string module
section in the documentation is based on the one from Python `string module
documentation <http://docs.python.org/3/library/string.html#module-string>`_
documentation <http
s
://docs.python.org/3/library/string.html#module-string>`_
adapted for the current library. For this reason the documentation is
adapted for the current library. For this reason the documentation is
distributed under the Python Software Foundation license available in
distributed under the Python Software Foundation license available in
`doc/python-license.txt
`doc/python-license.txt
...
@@ -409,4 +409,4 @@ formatting. Thanks `Ruslan Baratov <https://github.com/ruslo>`_ for comprehensiv
...
@@ -409,4 +409,4 @@ formatting. Thanks `Ruslan Baratov <https://github.com/ruslo>`_ for comprehensiv
and useful comments regarding performance, `Boris Kaul <https://github.com/localvoid>`_ for
and useful comments regarding performance, `Boris Kaul <https://github.com/localvoid>`_ for
`C++ counting digits benchmark <https://github.com/localvoid/cxx-benchmark-count-digits>`_.
`C++ counting digits benchmark <https://github.com/localvoid/cxx-benchmark-count-digits>`_.
Thanks to `CarterLi <https://github.com/CarterLi>`_ for contributing various
Thanks to `CarterLi <https://github.com/CarterLi>`_ for contributing various
improvements to the code.
improvements to the code.
\ No newline at end of file
doc/_templates/layout.html
View file @
1a166b0e
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
role=
"button"
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
role=
"button"
aria-expanded=
"false"
>
{{ version }}
<span
class=
"caret"
></span></a>
aria-expanded=
"false"
>
{{ version }}
<span
class=
"caret"
></span></a>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<li><a
href=
"http://cppformat.github.io/2.0.0/"
>
2.0.0
</a></li>
<li><a
href=
"http://cppformat.github.io/1.1.0/"
>
1.1.0
</a></li>
<li><a
href=
"http://cppformat.github.io/1.1.0/"
>
1.1.0
</a></li>
<li><a
href=
"http://cppformat.github.io/1.0.0/"
>
1.0.0
</a></li>
<li><a
href=
"http://cppformat.github.io/1.0.0/"
>
1.0.0
</a></li>
</ul>
</ul>
...
...
doc/api.rst
View file @
1a166b0e
...
@@ -8,8 +8,8 @@ All functions and classes provided by the C++ Format library reside
...
@@ -8,8 +8,8 @@ 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.
Format
ting functions
Format
API
==========
==========
==========
The following functions use :ref:`format string syntax <syntax>` similar
The following functions use :ref:`format string syntax <syntax>` similar
to the one used by Python's `str.format
to the one used by Python's `str.format
...
@@ -36,8 +36,11 @@ arguments in the resulting string.
...
@@ -36,8 +36,11 @@ arguments in the resulting string.
.. doxygenfunction:: print(std::ostream&, CStringRef, ArgList)
.. doxygenfunction:: print(std::ostream&, CStringRef, ArgList)
.. doxygenclass:: fmt::BasicFormatter
:members:
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
...
@@ -45,7 +48,9 @@ a POSIX extension for positional arguments.
...
@@ -45,7 +48,9 @@ a POSIX extension for positional arguments.
.. doxygenfunction:: printf(CStringRef, ArgList)
.. doxygenfunction:: printf(CStringRef, ArgList)
.. doxygenfunction:: fprintf(std::FILE*, CStringRef, ArgList)
.. doxygenfunction:: fprintf(std::FILE *, CStringRef, ArgList)
.. doxygenfunction:: fprintf(std::ostream&, CStringRef, ArgList)
.. doxygenfunction:: sprintf(CStringRef, ArgList)
.. doxygenfunction:: sprintf(CStringRef, ArgList)
...
...
doc/build.py
View file @
1a166b0e
...
@@ -69,10 +69,12 @@ def build_docs(version='dev'):
...
@@ -69,10 +69,12 @@ def build_docs(version='dev'):
XML_OUTPUT = doxyxml
XML_OUTPUT = doxyxml
ALIASES = "rst=\verbatim embed:rst"
ALIASES = "rst=\verbatim embed:rst"
ALIASES += "endrst=\endverbatim"
ALIASES += "endrst=\endverbatim"
MACRO_EXPANSION = YES
PREDEFINED = _WIN32=1 \
PREDEFINED = _WIN32=1 \
FMT_USE_VARIADIC_TEMPLATES=1 \
FMT_USE_VARIADIC_TEMPLATES=1 \
FMT_USE_RVALUE_REFERENCES=1 \
FMT_USE_RVALUE_REFERENCES=1 \
FMT_USE_USER_DEFINED_LITERALS=1
FMT_USE_USER_DEFINED_LITERALS=1 \
FMT_API=
EXCLUDE_SYMBOLS = fmt::internal::* StringValue write_str
EXCLUDE_SYMBOLS = fmt::internal::* StringValue write_str
'''
.
format
(
os
.
path
.
dirname
(
doc_dir
)).
encode
(
'UTF-8'
))
'''
.
format
(
os
.
path
.
dirname
(
doc_dir
)).
encode
(
'UTF-8'
))
if
p
.
returncode
!=
0
:
if
p
.
returncode
!=
0
:
...
...
doc/cppformat.less
View file @
1a166b0e
...
@@ -59,3 +59,8 @@ div.sphinxsidebar {
...
@@ -59,3 +59,8 @@ div.sphinxsidebar {
p.rubric {
p.rubric {
margin-top: 10px;
margin-top: 10px;
}
}
.github-btn {
border: 0;
overflow: hidden;
}
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