Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- ext/string.rb
Instance Method Summary collapse
Instance Method Details
#starts_with?(prefix) ⇒ Boolean
3 4 5 6 |
# File 'ext/string.rb', line 3 def starts_with?(prefix) prefix = prefix.to_s self[0, prefix.length] == prefix end |