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