Microsoft documentation shows both _tcsnicmp and _tcsncicmp (note the extra c) as TCHAR.H equivalents of _strnicmp for doing string comparisions. I’m not sure which one I should be using.
What is the difference between the two methods?
My best guess is that the nc version takes a count in number of characters and the n version takes a count in number of bytes.
All of the
_tcsfunctions are actually macros, and will resolve down to an equivalent function depending on which of_UNICODEor_MBCSmacros are defined for the build.Looking at the documentation, the two functions are identical except for the case when
_MBCSis defined, in which case they resolve to_mcsnicmpor_mbsnbicmp. The difference between those, as you stated, is whether the count is in characters or bytes.