Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.


Updated: March 2009

A virtual function called to convert a character of type CharType used by a locale to the corresponding character of type char in the native character set.

virtual const CharType *_Do_narrow_s(
    const CharType *first,
    const CharType *last,
    char default,
    char *dest,
    size_t dest_size
) const;


A pointer to the first character in the range of characters to be converted.


A pointer to the character immediately following the last character in the range of characters to be converted.


The default value to be assigned by the member function to characters of type CharType that do not have counterpart characters of type char.


A const pointer to the first character of type char in the destination range that stores the converted range of characters.


The size of dest in bytes.

This protected member function returns a pointer to the destination range of native characters converted from characters of type CharType.

This protected member template function stores in dest[I] the value _Do_narrow_s(first [I], default), for I in the interval [0, lastfirst).

See the example for ctype::_Narrow_s, which calls _Do_narrow_s.

Header: <locale>

Namespace: std




March 2009


Customer feedback.

Community Additions

© 2015 Microsoft