11

有人来讨论技术吗?如何高效的将字符串中的大小写互换?

 4 years ago
source link: https://www.v2ex.com/t/640883
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
程序员 - @GDC - 例如,输入 abcXYZhello123 输出 ABCxyzHELLO123 ;就是把字符串中的大写全换成小写、小写全换成大写。除了逐个字符判断+替换,还有什么更快速高效的方法吗?

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK