更新时间:2022-11-17 11:21:51
puts 'abcdefg'.start_with?('abc') #=> true
[edit]这是我在问这个问题之前不知道的事情:start_with
具有多个参数.
[edit] This is something I didn't know before this question: start_with
takes multiple arguments.
'abcdefg'.start_with?( 'xyz', 'opq', 'ab')