Re: _sntprintf and _sntprintf_s
- From: "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx>
- Date: Mon, 29 May 2006 06:36:33 -0700
I think in this case number of characters means TCHAR's, not number of
codepoints.
"Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx> wrote in message
news:udOyprwgGHA.1856@xxxxxxxxxxxxxxxxxxxxxxx
This looks terrible. Actually _snwprintf_s looks mostly OK, since the
programmer wants to do calculations on the number of wide characters and
keep track of how much space remains in the buffer. But why does
_snprintf_s return the number of characters instead of the number of
bytes?
If a programmer is using the ANSI version then the programmer wants to do
calculations on the number of bytes in order to keep track of how much
space
remains in the buffer. I also hope that _snwprintf_s doesn't have a split
personality on the treatment of surrogate pairs.
.
- References:
- _sntprintf and _sntprintf_s
- From: Norman Diamond
- _sntprintf and _sntprintf_s
- Prev by Date: Help regarding executing Sql script
- Next by Date: Re: _sntprintf and _sntprintf_s
- Previous by thread: _sntprintf and _sntprintf_s
- Next by thread: Re: _sntprintf and _sntprintf_s
- Index(es):
Relevant Pages
|