Namespaces
Variants
Views
Actions

Talk:cpp/string/multibyte/mbrtowc

From cppreference.com

[edit] Example parameters

The declaration of mbrtowc says 3rd parameter is a count of characters but the example on the page uses an end iterator instead and seems to run fine here as well, what's the deal with that?

Sim642 (talk) 09:18, 21 February 2015 (PST)

the 3rd argument in the example is a count of characters, expressed as difference between two pointers, see operator-(T*, T*) --Cubbi (talk) 20:56, 21 February 2015 (PST)