发布于 2015-06-14 01:49:17 | 325 次阅读 | 评论: 0 | 来源: 网络整理

大写和小写字符串(Uppercase and Lowercase Strings)

您可以通过字符串的uppercaseStringlowercaseString属性来访问大写/小写版本的字符串。


let normal = "Could you help me, please?"
let shouty = normal.uppercaseString
// shouty 值为 "COULD YOU HELP ME, PLEASE?"
let whispered = normal.lowercaseString
// whispered 值为 "could you help me, please?"
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务