void OnStart()
{
//--- 用小写字母定义源字符串
string text=" - this string, written in lowercase, must be written in uppercase";
//--- 在日志中显示源字符串
Print("Source line:\n", text);
//--- 将所有字符串的字符转换为大写字母并在日志中显示结果
if(StringToUpper(text))
Print("The original string after using the StringToUpper() function:\n", text);
/*
结果
Source line:
- this string, written in lowercase, must be written in uppercase
The original string after using the StringToUpper() function:
- THIS STRING, WRITTEN IN LOWERCASE, MUST BE WRITTEN IN UPPERCASE
*/
}
|