tmp/tmpe37ini5w/{from.md → to.md}
RENAMED
|
@@ -30,11 +30,11 @@ specifier for `printf` as follows: The conversion specifier is `f` if
|
|
| 30 |
`chars_format::scientific`, `a` (without leading `"0x"` in the result)
|
| 31 |
if `fmt` is `chars_format::hex`, and `g` if `fmt` is
|
| 32 |
`chars_format::general`.
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
-
to_chars_result to_chars(char* first, char* last,
|
| 36 |
```
|
| 37 |
|
| 38 |
*Preconditions:* `base` has a value between 2 and 36 (inclusive).
|
| 39 |
|
| 40 |
*Effects:* The value of `value` is converted to a string of digits in
|
|
@@ -42,30 +42,23 @@ the given base (with no redundant leading zeroes). Digits in the range
|
|
| 42 |
10..35 (inclusive) are represented as lowercase characters `a`..`z`. If
|
| 43 |
`value` is less than zero, the representation starts with `’-’`.
|
| 44 |
|
| 45 |
*Throws:* Nothing.
|
| 46 |
|
| 47 |
-
*Remarks:* The implementation shall provide overloads for all signed and
|
| 48 |
-
unsigned integer types and `char` as the type of the parameter `value`.
|
| 49 |
-
|
| 50 |
``` cpp
|
| 51 |
-
to_chars_result to_chars(char* first, char* last,
|
| 52 |
-
to_chars_result to_chars(char* first, char* last, double value);
|
| 53 |
-
to_chars_result to_chars(char* first, char* last, long double value);
|
| 54 |
```
|
| 55 |
|
| 56 |
*Effects:* `value` is converted to a string in the style of `printf` in
|
| 57 |
the `"C"` locale. The conversion specifier is `f` or `e`, chosen
|
| 58 |
according to the requirement for a shortest representation (see above);
|
| 59 |
a tie is resolved in favor of `f`.
|
| 60 |
|
| 61 |
*Throws:* Nothing.
|
| 62 |
|
| 63 |
``` cpp
|
| 64 |
-
to_chars_result to_chars(char* first, char* last,
|
| 65 |
-
to_chars_result to_chars(char* first, char* last, double value, chars_format fmt);
|
| 66 |
-
to_chars_result to_chars(char* first, char* last, long double value, chars_format fmt);
|
| 67 |
```
|
| 68 |
|
| 69 |
*Preconditions:* `fmt` has the value of one of the enumerators of
|
| 70 |
`chars_format`.
|
| 71 |
|
|
@@ -73,15 +66,11 @@ to_chars_result to_chars(char* first, char* last, long double value, chars_forma
|
|
| 73 |
the `"C"` locale.
|
| 74 |
|
| 75 |
*Throws:* Nothing.
|
| 76 |
|
| 77 |
``` cpp
|
| 78 |
-
to_chars_result to_chars(char* first, char* last,
|
| 79 |
-
chars_format fmt, int precision);
|
| 80 |
-
to_chars_result to_chars(char* first, char* last, double value,
|
| 81 |
-
chars_format fmt, int precision);
|
| 82 |
-
to_chars_result to_chars(char* first, char* last, long double value,
|
| 83 |
chars_format fmt, int precision);
|
| 84 |
```
|
| 85 |
|
| 86 |
*Preconditions:* `fmt` has the value of one of the enumerators of
|
| 87 |
`chars_format`.
|
|
|
|
| 30 |
`chars_format::scientific`, `a` (without leading `"0x"` in the result)
|
| 31 |
if `fmt` is `chars_format::hex`, and `g` if `fmt` is
|
| 32 |
`chars_format::general`.
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
+
constexpr to_chars_result to_chars(char* first, char* last, integer-type value, int base = 10);
|
| 36 |
```
|
| 37 |
|
| 38 |
*Preconditions:* `base` has a value between 2 and 36 (inclusive).
|
| 39 |
|
| 40 |
*Effects:* The value of `value` is converted to a string of digits in
|
|
|
|
| 42 |
10..35 (inclusive) are represented as lowercase characters `a`..`z`. If
|
| 43 |
`value` is less than zero, the representation starts with `’-’`.
|
| 44 |
|
| 45 |
*Throws:* Nothing.
|
| 46 |
|
|
|
|
|
|
|
|
|
|
| 47 |
``` cpp
|
| 48 |
+
to_chars_result to_chars(char* first, char* last, floating-point-type value);
|
|
|
|
|
|
|
| 49 |
```
|
| 50 |
|
| 51 |
*Effects:* `value` is converted to a string in the style of `printf` in
|
| 52 |
the `"C"` locale. The conversion specifier is `f` or `e`, chosen
|
| 53 |
according to the requirement for a shortest representation (see above);
|
| 54 |
a tie is resolved in favor of `f`.
|
| 55 |
|
| 56 |
*Throws:* Nothing.
|
| 57 |
|
| 58 |
``` cpp
|
| 59 |
+
to_chars_result to_chars(char* first, char* last, floating-point-type value, chars_format fmt);
|
|
|
|
|
|
|
| 60 |
```
|
| 61 |
|
| 62 |
*Preconditions:* `fmt` has the value of one of the enumerators of
|
| 63 |
`chars_format`.
|
| 64 |
|
|
|
|
| 66 |
the `"C"` locale.
|
| 67 |
|
| 68 |
*Throws:* Nothing.
|
| 69 |
|
| 70 |
``` cpp
|
| 71 |
+
to_chars_result to_chars(char* first, char* last, floating-point-type value,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
chars_format fmt, int precision);
|
| 73 |
```
|
| 74 |
|
| 75 |
*Preconditions:* `fmt` has the value of one of the enumerators of
|
| 76 |
`chars_format`.
|