Method: RIEL::StringExt#ends_with
- Defined in:
- lib/riel/string.rb
#ends_with(substr) ⇒ Object
Returns whether the string ends with the given substring.
18 19 20 |
# File 'lib/riel/string.rb', line 18 def ends_with substr return rindex(substr) == length - substr.length end |