codecvt::max_length

返回需要的外部 Byte的最大生成内部 CharType

int max_length( ) const throw( );

返回值

Byte需要的最大生成一个 CharType

备注

成员函数返回。do_max_length

示例

// codecvt_max_length.cpp
// compile with: /EHsc
#define _INTL
#include <locale>
#include <iostream>
using namespace std;

int main( )   
{
   locale loc( "C");//English_Britain" );//German_Germany
   int res = use_facet<codecvt<char, char, mbstate_t> >
     ( loc ).max_length( );
   wcout << res << endl;
}
1

要求

页眉: <区域设置>

命名空间: std

请参见

参考

codecvt 类