在 Ruby 中使用 casecmp 和模式匹配
有没有办法在 Ruby 中将 casecmp 与模式匹配结合使用?例如,如果我想比较“Ba”和“Alabama”,我可以使用 casecmp 来完成吗?
非常感谢
Is there any way to use casecmp in Ruby in conjunction with pattern matching? For example, if I want to compare "Ba" with "Alabama", would I be able to do it with casecmp?
Thanks so much
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的意思
?
http://www.ruby-doc.org/core-1.9.3 /Regexp.html,选项部分
Did you mean
?
http://www.ruby-doc.org/core-1.9.3/Regexp.html, section Options