Skip to content

Commit d87e3c7

Browse files
committed
Add string to documentation index
1 parent fd31a81 commit d87e3c7

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

doc/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
* xref:charconv.adoc[]
4848
* xref:stream.adoc[]
4949
* xref:numeric.adoc[]
50+
* xref:string.adoc[]
5051
* Benchmarks
5152
** xref:u128_benchmarks.adoc[]
5253
*** xref:u128_benchmarks.adoc#u128_linux[Linux]

doc/modules/ROOT/pages/api_reference.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,16 @@ Listed by analogous STL header.
244244
| Midpoint between two values
245245
|===
246246

247+
[#api_string]
248+
=== xref:string.adoc[`<string>`]
249+
[cols="1,2", options="header"]
250+
|===
251+
| Function | Description
252+
253+
| xref:string.adoc[`to_string`]
254+
| `std::string` conversion of base-10 values
255+
|===
256+
247257
[#api_macros]
248258
== Macros
249259

doc/modules/ROOT/pages/string.adoc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
////
2+
Copyright 2026 Matt Borland
3+
Distributed under the Boost Software License, Version 1.0.
4+
https://www.boost.org/LICENSE_1_0.txt
5+
////
6+
7+
[#String]
8+
= `<string>`
9+
:idprefix: string_
10+
11+
[source,c++]
12+
----
13+
#include <boost/int128/string.hpp>
14+
----
15+
16+
The following are functions analogous to those found in `<string>` for builtin integer types.
17+
18+
[source,c++]
19+
----
20+
#include <boost/int128/string.hpp>
21+
22+
namespace boost {
23+
namespace int128 {
24+
25+
inline std::string to_string(const int128_t& value);
26+
inline std::string to_string(const uint128_t& value);
27+
28+
} // namespace int128
29+
} // namespace boost
30+
----
31+
32+
Returns a `std::string` containing the decimal(base-10) representation of `value`.
33+
These functions may throw `std::bad_alloc` from the constructor of `std::string`.
34+

0 commit comments

Comments
 (0)