Skip to content

Commit 70f9df7

Browse files
Tyler WhitneyTyler Whitney
authored andcommitted
I think hyphenating only part of shortest round-trip behavior conveys the wrong idea
1 parent 897edf1 commit 70f9df7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/standard-library/charconv-functions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The \<charconv> header includes the following non-member functions:
1313
|[to_chars](#to_chars) | Convert an integer or floating-point value to a sequence of **`char`**. |
1414
|[from_chars](#from_chars) | Convert a sequence of **`char`** to an integer or floating-point value. |
1515

16-
These conversion functions are tuned for performance, and also support shortest round-trip behavior. Shortest round-trip behavior means when a number is converted to chars, only enough precision is written out to enable recovering the original number when converting those chars back to a floating-point.
16+
These conversion functions are tuned for performance, and also support shortest-round-trip behavior. Shortest-round-trip behavior means when a number is converted to chars, only enough precision is written out to enable recovering the original number when converting those chars back to a floating-point.
1717

1818
- When converting chars to a number, the numeric value doesn't need to be null-terminated. Likewise, when converting a number to chars, the result isn't null-terminated.
1919
- The conversion functions don't allocate memory. You own the buffer in all cases.
@@ -89,13 +89,13 @@ A [to_chars_result](to-chars-result-structure.md) containing the result of the c
8989
Functions taking a [chars_format](chars-format-class.md) parameter determine the conversion specifier as if they were using `printf()` as follows:
9090
The conversion specifier is `'f'` if `fmt` is `chars_format::fixed`, `'e'` if `fmt` is `chars_format::scientific`, `'a'` (without the leading `0x` in the result) if `fmt` is `chars_format::hex`, and `'g'` if `fmt` is `chars_format::general`. Specifying the shortest fixed notation may still result in lengthy output because it may be the shortest possible representation when the value is very large or very small.
9191
92-
The following table describes the conversion behavior given different combinations of `fmt` and `precision` parameters. The term "shortest round trip" refers to writing the fewest number of digits necessary such that parsing that representation using the corresponding `from_chars` function will recover the value exactly.
92+
The following table describes the conversion behavior given different combinations of `fmt` and `precision` parameters. The term "shortest-round-trip behavior" refers to writing the fewest number of digits necessary such that parsing that representation using the corresponding `from_chars` function will recover the value exactly.
9393
9494
| `fmt` and `precision` combination | Output |
9595
|--|--|
9696
| Neither | Whichever of fixed or scientific notation is shorter, preferring fixed as a tiebreaker.</br>This behavior can't be simulated by any overload that takes the `fmt` parameter. |
97-
| `fmt` | The shortest round-trip behavior for the specified format, such as the shortest scientific format. |
98-
| `fmt` and `precision` | Uses the given precision, following `printf()` style, without shortest round-trip behavior. |
97+
| `fmt` | The shortest-round-trip behavior for the specified format, such as the shortest scientific format. |
98+
| `fmt` and `precision` | Uses the given precision, following `printf()` style, without shortest-round-trip behavior. |
9999
100100
### Return value
101101

0 commit comments

Comments
 (0)