Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/armoredcode-misc/string.rb

Instance Method Summary collapse

Instance Method Details

#starts_with?(pattern) ⇒ Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/armoredcode-misc/string.rb', line 2

def starts_with?(pattern)
  ! self.match(/^#{pattern}/).nil?
end