mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
10 lines
332 B
Plaintext
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].
|