2024年4月19日发(作者:)

MSDN中关于CString类的说明

Other Conversions

---------------------------------------------------------------------------------------------------------------------------

CString::MakeUpper

void MakeUpper( );

Remarks

备注

Converts this CString object to an uppercase string.

将原对象的所有小写英文字母转换为大写。

(只是将小写的英文字母转换为大写,对于其它的字符不做变化,例如:大写字符,数字,汉字)

Example

实例

The following example demonstrates the use of CString::MakeUpper.

// example for CString::MakeUpper

CString s( "abc" );

per();

ASSERT( s == "ABC" );

---------------------------------------------------------------------------------------------------------------------------

CString::MakeLower

void MakeLower( );

Remarks

备注

Converts this CString object to a lowercase string.

将原对象的所有大写英文字母转换为小写。

(只是将大写的英文字母转换为小写,对于其它的字符不做变化,例如:小写字符,数字,汉字)

Example

实例

The following example demonstrates the use of CString::MakeLower.

// example for CString::MakeLower

CString s( "ABC" );

wer();

ASSERT( s == "abc" );

---------------------------------------------------------------------------------------------------------------------------

CString::MakeReverse

void MakeReverse( );

Remarks

备注

Reverses the order of the characters in this CString object.

将原对象的所有字符颠倒顺序。

Example

实例

The following example demonstrates the use of CString::MakeReverse.

// example for CString::MakeReverse

CString s( "abc" );

verse();

ASSERT( s == "cba" );

---------------------------------------------------------------------------------------------------------------------------