mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
[DOc] Tweaks for String#end_with?
This commit is contained in:
parent
e2bd36388f
commit
ff6a8e95b7
@ -1,11 +1,10 @@
|
||||
Returns whether +self+ ends with any of the given +strings+.
|
||||
Returns whether +self+ ends with any of the given +strings+:
|
||||
|
||||
Returns +true+ if any given string matches the end, +false+ otherwise:
|
||||
'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
|
||||
|
||||
'hello'.end_with?('ello') #=> true
|
||||
'hello'.end_with?('heaven', 'ello') #=> true
|
||||
'hello'.end_with?('heaven', 'paradise') #=> false
|
||||
'тест'.end_with?('т') # => true
|
||||
'こんにちは'.end_with?('は') # => true
|
||||
|
||||
Related: String#start_with?.
|
||||
Related: see {Querying}[rdoc-ref:String@Querying].
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user