tmp/tmpac3wedph/{from.md → to.md}
RENAMED
|
@@ -13,17 +13,17 @@ unsigned long long stoull(const string& str, size_t* idx = nullptr, int base = 1
|
|
| 13 |
`strtoul(str.c_str(), ptr, base)`, `strtoll(str.c_str(), ptr, base)`,
|
| 14 |
and `strtoull(str.c_str(), ptr, base)`, respectively. Each function
|
| 15 |
returns the converted result, if any. The argument `ptr` designates a
|
| 16 |
pointer to an object internal to the function that is used to determine
|
| 17 |
what to store at `*idx`. If the function does not throw an exception and
|
| 18 |
-
`idx !=
|
| 19 |
unconverted element of `str`.
|
| 20 |
|
| 21 |
*Returns:* The converted result.
|
| 22 |
|
| 23 |
*Throws:* `invalid_argument` if `strtol`, `strtoul`, `strtoll`, or
|
| 24 |
-
`strtoull` reports that no conversion
|
| 25 |
`out_of_range` if `strtol`, `strtoul`, `strtoll` or `strtoull` sets
|
| 26 |
`errno` to `ERANGE`, or if the converted value is outside the range of
|
| 27 |
representable values for the return type.
|
| 28 |
|
| 29 |
``` cpp
|
|
@@ -35,20 +35,19 @@ long double stold(const string& str, size_t* idx = nullptr);
|
|
| 35 |
*Effects:* These functions call `strtof(str.c_str(), ptr)`,
|
| 36 |
`strtod(str.c_str(), ptr)`, and `strtold(str.c_str(), ptr)`,
|
| 37 |
respectively. Each function returns the converted result, if any. The
|
| 38 |
argument `ptr` designates a pointer to an object internal to the
|
| 39 |
function that is used to determine what to store at `*idx`. If the
|
| 40 |
-
function does not throw an exception and `idx !=
|
| 41 |
-
in `*idx` the index of the first unconverted element of `str`.
|
| 42 |
|
| 43 |
*Returns:* The converted result.
|
| 44 |
|
| 45 |
*Throws:* `invalid_argument` if `strtof`, `strtod`, or `strtold` reports
|
| 46 |
-
that no conversion
|
| 47 |
-
`
|
| 48 |
-
|
| 49 |
-
return type.
|
| 50 |
|
| 51 |
``` cpp
|
| 52 |
string to_string(int val);
|
| 53 |
string to_string(unsigned val);
|
| 54 |
string to_string(long val);
|
|
@@ -80,17 +79,17 @@ unsigned long long stoull(const wstring& str, size_t* idx = nullptr, int base =
|
|
| 80 |
`wcstoul(str.c_str(), ptr, base)`, `wcstoll(str.c_str(), ptr, base)`,
|
| 81 |
and `wcstoull(str.c_str(), ptr, base)`, respectively. Each function
|
| 82 |
returns the converted result, if any. The argument `ptr` designates a
|
| 83 |
pointer to an object internal to the function that is used to determine
|
| 84 |
what to store at `*idx`. If the function does not throw an exception and
|
| 85 |
-
`idx !=
|
| 86 |
unconverted element of `str`.
|
| 87 |
|
| 88 |
*Returns:* The converted result.
|
| 89 |
|
| 90 |
*Throws:* `invalid_argument` if `wcstol`, `wcstoul`, `wcstoll`, or
|
| 91 |
-
`wcstoull` reports that no conversion
|
| 92 |
`out_of_range` if the converted value is outside the range of
|
| 93 |
representable values for the return type.
|
| 94 |
|
| 95 |
``` cpp
|
| 96 |
float stof(const wstring& str, size_t* idx = nullptr);
|
|
@@ -101,18 +100,18 @@ long double stold(const wstring& str, size_t* idx = nullptr);
|
|
| 101 |
*Effects:* These functions call `wcstof(str.c_str(), ptr)`,
|
| 102 |
`wcstod(str.c_str(), ptr)`, and `wcstold(str.c_str(), ptr)`,
|
| 103 |
respectively. Each function returns the converted result, if any. The
|
| 104 |
argument `ptr` designates a pointer to an object internal to the
|
| 105 |
function that is used to determine what to store at `*idx`. If the
|
| 106 |
-
function does not throw an exception and `idx !=
|
| 107 |
-
in `*idx` the index of the first unconverted element of `str`.
|
| 108 |
|
| 109 |
*Returns:* The converted result.
|
| 110 |
|
| 111 |
*Throws:* `invalid_argument` if `wcstof`, `wcstod`, or `wcstold` reports
|
| 112 |
-
that no conversion
|
| 113 |
-
`
|
| 114 |
|
| 115 |
``` cpp
|
| 116 |
wstring to_wstring(int val);
|
| 117 |
wstring to_wstring(unsigned val);
|
| 118 |
wstring to_wstring(long val);
|
|
|
|
| 13 |
`strtoul(str.c_str(), ptr, base)`, `strtoll(str.c_str(), ptr, base)`,
|
| 14 |
and `strtoull(str.c_str(), ptr, base)`, respectively. Each function
|
| 15 |
returns the converted result, if any. The argument `ptr` designates a
|
| 16 |
pointer to an object internal to the function that is used to determine
|
| 17 |
what to store at `*idx`. If the function does not throw an exception and
|
| 18 |
+
`idx != nullptr`, the function stores in `*idx` the index of the first
|
| 19 |
unconverted element of `str`.
|
| 20 |
|
| 21 |
*Returns:* The converted result.
|
| 22 |
|
| 23 |
*Throws:* `invalid_argument` if `strtol`, `strtoul`, `strtoll`, or
|
| 24 |
+
`strtoull` reports that no conversion can be performed. Throws
|
| 25 |
`out_of_range` if `strtol`, `strtoul`, `strtoll` or `strtoull` sets
|
| 26 |
`errno` to `ERANGE`, or if the converted value is outside the range of
|
| 27 |
representable values for the return type.
|
| 28 |
|
| 29 |
``` cpp
|
|
|
|
| 35 |
*Effects:* These functions call `strtof(str.c_str(), ptr)`,
|
| 36 |
`strtod(str.c_str(), ptr)`, and `strtold(str.c_str(), ptr)`,
|
| 37 |
respectively. Each function returns the converted result, if any. The
|
| 38 |
argument `ptr` designates a pointer to an object internal to the
|
| 39 |
function that is used to determine what to store at `*idx`. If the
|
| 40 |
+
function does not throw an exception and `idx != nullptr`, the function
|
| 41 |
+
stores in `*idx` the index of the first unconverted element of `str`.
|
| 42 |
|
| 43 |
*Returns:* The converted result.
|
| 44 |
|
| 45 |
*Throws:* `invalid_argument` if `strtof`, `strtod`, or `strtold` reports
|
| 46 |
+
that no conversion can be performed. Throws `out_of_range` if `strtof`,
|
| 47 |
+
`strtod`, or `strtold` sets `errno` to `ERANGE` or if the converted
|
| 48 |
+
value is outside the range of representable values for the return type.
|
|
|
|
| 49 |
|
| 50 |
``` cpp
|
| 51 |
string to_string(int val);
|
| 52 |
string to_string(unsigned val);
|
| 53 |
string to_string(long val);
|
|
|
|
| 79 |
`wcstoul(str.c_str(), ptr, base)`, `wcstoll(str.c_str(), ptr, base)`,
|
| 80 |
and `wcstoull(str.c_str(), ptr, base)`, respectively. Each function
|
| 81 |
returns the converted result, if any. The argument `ptr` designates a
|
| 82 |
pointer to an object internal to the function that is used to determine
|
| 83 |
what to store at `*idx`. If the function does not throw an exception and
|
| 84 |
+
`idx != nullptr`, the function stores in `*idx` the index of the first
|
| 85 |
unconverted element of `str`.
|
| 86 |
|
| 87 |
*Returns:* The converted result.
|
| 88 |
|
| 89 |
*Throws:* `invalid_argument` if `wcstol`, `wcstoul`, `wcstoll`, or
|
| 90 |
+
`wcstoull` reports that no conversion can be performed. Throws
|
| 91 |
`out_of_range` if the converted value is outside the range of
|
| 92 |
representable values for the return type.
|
| 93 |
|
| 94 |
``` cpp
|
| 95 |
float stof(const wstring& str, size_t* idx = nullptr);
|
|
|
|
| 100 |
*Effects:* These functions call `wcstof(str.c_str(), ptr)`,
|
| 101 |
`wcstod(str.c_str(), ptr)`, and `wcstold(str.c_str(), ptr)`,
|
| 102 |
respectively. Each function returns the converted result, if any. The
|
| 103 |
argument `ptr` designates a pointer to an object internal to the
|
| 104 |
function that is used to determine what to store at `*idx`. If the
|
| 105 |
+
function does not throw an exception and `idx != nullptr`, the function
|
| 106 |
+
stores in `*idx` the index of the first unconverted element of `str`.
|
| 107 |
|
| 108 |
*Returns:* The converted result.
|
| 109 |
|
| 110 |
*Throws:* `invalid_argument` if `wcstof`, `wcstod`, or `wcstold` reports
|
| 111 |
+
that no conversion can be performed. Throws `out_of_range` if `wcstof`,
|
| 112 |
+
`wcstod`, or `wcstold` sets `errno` to `ERANGE`.
|
| 113 |
|
| 114 |
``` cpp
|
| 115 |
wstring to_wstring(int val);
|
| 116 |
wstring to_wstring(unsigned val);
|
| 117 |
wstring to_wstring(long val);
|