1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/doc/string/end_with_p.rdoc
Burdette Lamar b257034ae5
[DOC] Enhanced RDoc for String (#5730)
Treats:

    #start_with?
    #end_with?
    #delete_prefix
    #delete_prefix!
    #delete_suffix
    #delete_suffix!
2022-03-29 09:54:29 -05:00

11 lines
435 B
Text

Returns whether +self+ ends with any of the given +strings+.
Returns +true+ if any given string matches the end, +false+ otherwise:
'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?.