You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/standard-library/charconv-functions.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The \<charconv> header includes the following non-member functions:
13
13
|[to_chars](#to_chars)| Convert an integer or floating-point value to a sequence of **`char`**. |
14
14
|[from_chars](#from_chars)| Convert a sequence of **`char`** to an integer or floating-point value. |
15
15
16
-
These conversion functions are tuned for performance, and also support shortestround-trip behavior. Shortestround-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.
17
17
18
18
- 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.
19
19
- 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
89
89
Functions taking a [chars_format](chars-format-class.md) parameter determine the conversion specifier as if they were using `printf()` as follows:
90
90
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.
91
91
92
-
The following table describes the conversion behavior given different combinations of `fmt` and `precision` parameters. The term "shortestroundtrip" 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.
93
93
94
94
| `fmt` and `precision` combination | Output |
95
95
|--|--|
96
96
| 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 shortestround-trip behavior for the specified format, such as the shortest scientific format. |
98
-
| `fmt` and `precision` | Uses the given precision, following `printf()` style, without shortestround-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. |
0 commit comments