CString::MakeLower
void MakeLower( );ResConverts this CString object to a lowercase string.ExampleThe following example demonstrates the use of CString::MakeLower.// example for CString::MakeLower
CString s( "ABC" );
s.MakeLower();
ASSERT( s == "abc" );
void MakeLower( );ResConverts this CString object to a lowercase string.ExampleThe following example demonstrates the use of CString::MakeLower.// example for CString::MakeLower
CString s( "ABC" );
s.MakeLower();
ASSERT( s == "abc" );
#define _UNICODE
TCHAR p[]=L"AAA123一二三";
int i;
for(i=0;p[i]!=NULL;i++)
{
if(p[i]>=L'A'&&p[i]<=L'Z')
{
p[i]=L'a'+p[i]-L'A';
}
}
我不熟悉CString的功能是否能够同时判别汉字与英文;也不熟悉字符串在其混用的情况下会发生什么事,我只觉的汉字两字节表示的时候,其中一个字节的数值要是与ANSI码中的字母相等,而CString又是按ANSI来处理,那就会出现乱码,所以还不如自己编个小程序,这样就保证不会出错。