mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 05:29:10 +02:00
10 lines
379 B
Text
10 lines
379 B
Text
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
|
|
'こんにちは'.end_with?('は') # => true
|
|
|
|
Related: see {Querying}[rdoc-ref:String@Querying].
|