Contents

Roo

Text.starts_with?()

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

text.starts_with?(query as Text) as Boolean

Parameters

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

Returns

  • Boolean

Example

"Hello world!".starts_with?("Hel") # => True
"Apple".starts_with?("ap") # => False