summaryrefslogtreecommitdiff
path: root/doc/string/end_with_p.rdoc
blob: fcd92421225ca85e361de11097d9de2b1c3b04fe (plain)
1
2
3
4
5
6
7
8
9
10
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].