[Cfp-interest 1499] Re: AI item to submit proposal about why no wide string strfrom functions

Fred J. Tydeman tydeman at tybor.com
Wed Feb 19 11:03:49 PST 2020


On Thu, 20 Feb 2020 05:32:26 +1100 (AEDT) Damian McGuckin wrote:
>
>Note that Mike is correct in that C2X explicitly says that the string 's'
>will NOT be NUL ('\0') terminated if
>
>       n < nc

Where are you seeing that?

7.22.1.3 in returns has: ;... null-terminated output ...

7.21.6.5 has: ... output characters beyond the n-1st are discarded rather than being written
to the array, and a null character is written at the end of the characters actually written into the array.



---
Fred J. Tydeman        Tydeman Consulting
tydeman at tybor.com      Testing, numerics, programming
+1 (702) 608-6093      Vice-chair of PL22.11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.



More information about the Cfp-interest mailing list