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/c-runtime-library/reference/strtime-wstrtime.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -44,9 +44,9 @@ Returns a pointer to the resulting character string *`timestr`*.
44
44
45
45
## Remarks
46
46
47
-
The **`_strtime`** function copies the current local time into the buffer pointed to by *`timestr`*. The time is formatted as *hh:mm:ss* where *hh* is two digits representing the hour in 24-hour notation, *mm* is two digits representing the minutes past the hour, and *ss* is two digits representing seconds. For example, the string *18:23:44* represents 23 minutes and 44 seconds past 6 P.M. The buffer must be at least 9 bytes long.
47
+
The **`_strtime`** function copies the current local time into the buffer pointed to by *`timestr`*. The time is formatted as *`hh:mm:ss`*, where *`hh`* is two digits that represent the hour in 24-hour notation. *`mm`* is two digits for the minutes past the hour, and *`ss`* is two digits for seconds. For example, the string *`18:23:44`* represents 23 minutes and 44 seconds after 6 P.M. The buffer must be at least 9 bytes long.
48
48
49
-
**`_wstrtime`** is a wide-character version of **`_strtime`**; the argument and return value of **`_wstrtime`** are wide-character strings. These functions behave identically otherwise. If *`timestr`* is a `NULL` pointer or if *`timestr`* is formatted incorrectly, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If the exception is allowed to continue, these functions return a `NULL` and set `errno` to `EINVAL` if *`timestr`* was a `NULL` or set `errno` to `ERANGE` if *`timestr`* is formatted incorrectly.
49
+
**`_wstrtime`** is a wide-character version of **`_strtime`**; the argument and return value of **`_wstrtime`** are wide-character strings. These functions behave identically otherwise. If *`timestr`* is a `NULL` pointer or if *`timestr`* is formatted incorrectly, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If the exception is allowed to continue, these functions return a `NULL`, and set `errno` to `EINVAL` if *`timestr`* was a `NULL` or set `errno` to `ERANGE` if *`timestr`* is formatted incorrectly.
50
50
51
51
In C++, these functions have template overloads that invoke the newer, secure counterparts of these functions. For more information, see [Secure template overloads](../secure-template-overloads.md).
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ In either form, if there isn't an exponent part or a radix point character, a ra
99
99
100
100
Case is ignored in both the **`INF`** and **`NAN`** forms. The first character that doesn't fit one of these forms stops the scan.
101
101
102
-
The UCRT versions of these functions don't support conversion of Fortran-style (**`d`** or **`D`**) exponent letters. This non-standard extension was supported by earlier versions of the CRT, and may be a breaking change for your code. The UCRT versions support hexadecimal strings and round-tripping of `INF` and `NAN` values, which weren't supported in earlier versions. This can also cause breaking changes in your code. For example, the string "`0x1a`" would be interpreted by **`strtod`** as 0.0 in previous versions, but as 26.0 in the UCRT version.
102
+
The UCRT versions of these functions don't support conversion of Fortran-style (**`d`** or **`D`**) exponent letters. This non-standard extension was supported by earlier versions of the CRT, and may be a breaking change for your code. The UCRT versions support hexadecimal strings and round-tripping of `INF` and `NAN` values, which weren't supported in earlier versions. This support can also cause breaking changes in your code. For example, the string "`0x1a`" would be interpreted by **`strtod`** as 0.0 in previous versions, but as 26.0 in the UCRT version.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/strtof-strtof-l-wcstof-wcstof-l.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -50,15 +50,15 @@ The locale to use.
50
50
51
51
## Return value
52
52
53
-
**`strtof`** returns the value of the floating-point number, except when the representation would cause an overflow, in which case the function returns +/-`HUGE_VALF`. The sign of `HUGE_VALF` matches the sign of the value that cannot be represented. **`strtof`** returns 0 if no conversion can be performed or an underflow occurs.
53
+
**`strtof`** returns the value of the floating-point number, except when the representation would cause an overflow, in which case the function returns +/-`HUGE_VALF`. The sign of `HUGE_VALF` matches the sign of the value that can't be represented. **`strtof`** returns 0 if no conversion can be performed or an underflow occurs.
54
54
55
55
**`wcstof`** returns values analogously to **`strtof`**. For both functions, `errno` is set to `ERANGE` if overflow or underflow occurs and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md).
56
56
57
57
For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
58
58
59
59
## Remarks
60
60
61
-
Each function converts the input string *`strSource`* to a **`float`**. The **`strtof`** function converts *`strSource`* to a single-precision value. **`strtof`** stops reading the string *`strSource`* at the first character it cannot recognize as part of a number. This may be the terminating null character. **`wcstof`** is a wide-character version of **`strtof`**; its *`strSource`* argument is a wide-character string. Otherwise, these functions behave identically.
61
+
Each function converts the input string *`strSource`* to a **`float`**. The **`strtof`** function converts *`strSource`* to a single-precision value. **`strtof`** stops reading the string *`strSource`* at the first character it can't recognize as part of a number. This character may be the terminating null character. **`wcstof`** is a wide-character version of **`strtof`**; its *`strSource`* argument is a wide-character string. Otherwise, these functions behave identically.
62
62
63
63
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
64
64
@@ -71,15 +71,15 @@ By default, this function's global state is scoped to the application. To change
71
71
72
72
The `LC_NUMERIC` category setting of the current locale determines recognition of the radix character in *`strSource`*; for more information, see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md). The functions that don't have the `_l` suffix use the current locale; the ones that have the suffix are identical except that they use the locale that's passed in instead. For more information, see [Locale](../locale.md).
73
73
74
-
If *`endptr`*is not`NULL`, a pointer to the character that stopped the scan is stored at the location that's pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location that's pointed to by *`endptr`*.
74
+
If *`endptr`*isn't`NULL`, a pointer to the character that stopped the scan is stored at the location that's pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location that's pointed to by *`endptr`*.
75
75
76
76
**`strtof`** expects *`strSource`* to point to a string of the following form:
A *`whitespace`* may consist of space and tab characters, which are ignored; *`sign`* is either plus (**`+`**) or minus (**`-`**); and *`digits`* are one or more decimal digits. If no digits appear before the radix character, at least one must appear after the radix character. The decimal digits can be followed by an exponent, which consists of an introductory letter (**`e`** or **`E`**) and an optionally signed integer. If neither an exponent part nor a radix character appears, a radix character is assumed to follow the last digit in the string. The first character that does not fit this form stops the scan.
80
+
A *`whitespace`* may consist of space and tab characters, which are ignored; *`sign`* is either plus (**`+`**) or minus (**`-`**); and *`digits`* are one or more decimal digits. If no digits appear before the radix character, at least one must appear after the radix character. The decimal digits can be followed by an exponent, which consists of an introductory letter (**`e`** or **`E`**) and an optionally signed integer. If no exponent part or radix character appears, a radix character is assumed to follow the last digit in the string. The first character that doesn't fit this form stops the scan.
81
81
82
-
The UCRT versions of these functions do not support conversion of Fortran-style (**`d`** or **`D`**) exponent letters. This non-standard extension was supported by earlier versions of the CRT, and may be a breaking change for your code.
82
+
The UCRT versions of these functions don't support conversion of Fortran-style (**`d`** or **`D`**) exponent letters. This non-standard extension was supported by earlier versions of the CRT, and may be a breaking change for your code.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -67,11 +67,11 @@ For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlis
67
67
68
68
## Remarks
69
69
70
-
The **`strtoimax`** function converts *`strSource`* to an `intmax_t`. The wide-character version of **`strtoimax`** is **`wcstoimax`**; its *`strSource`* argument is a wide-character string. Otherwise, these functions behave identically. Both functions stop reading the string *`strSource`* at the first character they cannot recognize as part of a number. This may be the terminating null character, or it may be the first numeric character that's greater than or equal to *`base`*.
70
+
The **`strtoimax`** function converts *`strSource`* to an `intmax_t`. The wide-character version of **`strtoimax`** is **`wcstoimax`**; its *`strSource`* argument is a wide-character string. Otherwise, these functions behave identically. Both functions stop reading the string *`strSource`* at the first character they can't recognize as part of a number. It may be the terminating null character, or it may be the first numeric character that's greater than or equal to *`base`*.
71
71
72
72
The locale's `LC_NUMERIC` category setting determines recognition of the radix character in *`strSource`*; for more information, see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md). The functions that don't have the `_l` suffix use the current locale; **`_strtoimax_l`** and **`_wcstoimax_l`** are identical to the corresponding functions that don't have the `_l` suffix except that they instead use the locale that's passed in. For more information, see [Locale](../locale.md).
73
73
74
-
If *`endptr`*is not`NULL`, a pointer to the character that stopped the scan is stored at the location that's pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location that's pointed to by *`endptr`*.
74
+
If *`endptr`*isn't`NULL`, a pointer to the character that stopped the scan is stored at the location that's pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location that's pointed to by *`endptr`*.
75
75
76
76
### Generic-text routine mappings
77
77
@@ -84,7 +84,7 @@ If *`endptr`* is not `NULL`, a pointer to the character that stopped the scan is
A *`whitespace`* may consist of space and tab characters, which are ignored; *`digits`* are one or more decimal digits; *`letters`* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that does not fit this form stops the scan. If *`base`* is between 2 and 36, then it is used as the base of the number. If *`base`* is 0, the initial characters of the string pointed to by *`strSource`* are used to determine the base. If the first character is '0' and the second character is not 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *`base`* are permitted. The first character outside the range of the base stops the scan. For example, if *`base`* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character would stop the scan.
87
+
A *`whitespace`* may consist of space and tab characters, which are ignored; *`digits`* are one or more decimal digits; *`letters`* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that doesn't fit this form stops the scan. If *`base`* is between 2 and 36, then it's used as the base of the number. If *`base`* is 0, the initial characters of the string pointed to by *`strSource`* are used to determine the base. If the first character is '0' and the second character isn't 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *`base`* are permitted. The first character outside the range of the base stops the scan. For example, if *`base`* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character would stop the scan.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ If *`str`* is `NULL` but *`context`* is a pointer to a valid context pointer, th
90
90
91
91
## Remarks
92
92
93
-
The **`strtok_s`** family of functions finds the next token in *`str`*. The set of characters in *`delimiters`* specifies possible delimiters of the token to be found in *`str`* on the current call. **`wcstok_s`** and **`_mbstok_s`** are wide-character and multibyte-character versions of **`strtok_s`**. The arguments and return values of **`wcstok_s`** and **`_wcstok_s_l`** are wide-character strings; those of **`_mbstok_s`** and **`_mbstok_s_l`** are multibyte-character strings. These functions behave identically otherwise.
93
+
The **`strtok_s`** family of functions finds the next token in *`str`*. The set of characters in *`delimiters`* specifies possible delimiters of the token to be found in *`str`* on the current call. **`wcstok_s`** and **`_mbstok_s`** are wide-character and multibyte-character versions of **`strtok_s`**. The arguments and return values of **`wcstok_s`** and **`_wcstok_s_l`** are wide-character strings. The arguments and return values of **`_mbstok_s`** and **`_mbstok_s_l`** are multibyte-character strings. These functions behave identically otherwise.
94
94
95
95
This function validates its parameters. When an error condition occurs, as in the Error Conditions table, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set `errno` to `EINVAL` and return `NULL`.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -74,9 +74,9 @@ Returns a pointer to the next token found in *`strToken`*. The functions return
74
74
75
75
## Remarks
76
76
77
-
The **`strtok`** function finds the next token in *`strToken`*. The set of characters in *`strDelimit`* specifies possible delimiters of the token to be found in *`strToken`* on the current call. **`wcstok`** and **`_mbstok`** are wide-character and multibyte-character versions of **`strtok`**. The arguments and return value of **`wcstok`** are wide-character strings; those of **`_mbstok`** are multibyte-character strings. These three functions behave identically otherwise.
77
+
The **`strtok`** function finds the next token in *`strToken`*. The set of characters in *`strDelimit`* specifies possible delimiters of the token to be found in *`strToken`* on the current call. **`wcstok`** and **`_mbstok`** are wide-character and multibyte-character versions of **`strtok`**. The arguments and return value of **`wcstok`** are wide-character strings. The argumets and return value of **`_mbstok`** are multibyte-character strings. These three functions behave identically otherwise.
78
78
79
-
The two argument version of **`wcstok`**is not standard. If you need to use that version, you'll need to define `_CRT_NON_CONFORMING_WCSTOK` before you `#include <wchar.h>` (or `#include <string.h>`).
79
+
The two argument version of **`wcstok`**isn't standard. If you need to use that version, you'll need to define `_CRT_NON_CONFORMING_WCSTOK` before you `#include <wchar.h>` (or `#include <string.h>`).
80
80
81
81
> [!IMPORTANT]
82
82
> These functions incur a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns).
0 commit comments