Contents

Roo

Text.ends_with?()

Returns True if this Text object ends with the query text. Returns False otherwise.

text.ends_with?(query as Text) as Boolean

Parameters

  • query. Text object. The text that you want to check if this text ends with.

Returns

  • Boolean

Example

"Hello world!".ends_with?("!") # => True
"Apple".ends_with?("Pear") # => False