首页
文章
活动
博客
图书
招聘
Search
登录
注册
使用ruby将句中所有单词首字母大写
2010-05-26
刘俊
ruby本身的方法里面没有,可以用这个:
str='this is a demo'
puts str.gsub(/\b\w/) { $&.upcase }
53
该文章对我有帮助
888°
/
8880 人阅读
/
0 条评论
发表评论
请
登录
后发表评论
刘俊
访客 94202
刘俊
的其他博文
更多
FFI::NotFoundError: Function '_get_errno' not found in [msvcrt.dll]
minitest框架用断言提示no such file to load -- diff.exe
自动化测试的代码检查谁来负责?
watir处理弹出框(非autoit版)
watir控制代码执行速度
关闭:为帮助保护你的安全,Internet Explorer已经阻止了从此站点下载文件到你的计算机
selenium/watir-webdriver远程启动目标机器运行脚本
Ruby中的数组操作
自动化测试的疑惑
ruby个位数左侧自动补0