ruby/doc/string/end_with_p.rdoc
2025-12-27 10:59:48 -05:00

10 lines
332 B
Plaintext

Returns whether +self+ ends with any of the given +strings+:
'foo'.end_with?('oo') # => true
'foo'.end_with?('bar', 'oo') # => true
'foo'.end_with?('bar', 'baz') # => false
'foo'.end_with?('') # => true
'こんにちは'.end_with?('は') # => true
Related: see {Querying}[rdoc-ref:String@Querying].