服务热线:13616026886

技术文档 欢迎使用技术文档,我们为你提供从新手到专业开发者的所有资源,你也可以通过它日益精进

位置:首页 > 技术文档 > JAVA > 新手入门 > 基础入门 > 查看文档

touppercase 方法

 

返回一个字符串,该字符串中的所有字母都被转化为大写字母。

strvariable.touppercase( )
"string literal".touppercase( )

说明

touppercase 方法对非字母字符不会产生影响。

示例

下面的示例演示了 touppercase 方法的效果:

var strvariable = "this is a string object";strvariable = strvariable.touppercase( );

在执行上一条语句后 strvariable 的值为:

this is a string object

要求

版本 1

请参阅

string 对象的方法 | string 对象的属性 | tolowercase 方法

应用于: string 对象

扫描关注微信公众号