Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/iron_worker_ng.rb
Instance Method Summary collapse
Instance Method Details
#end_with?(suffix) ⇒ Boolean
14 15 16 17 |
# File 'lib/iron_worker_ng.rb', line 14 def end_with?(suffix) suffix = suffix.to_s self[-suffix.length, suffix.length] == suffix end |
#start_with?(prefix) ⇒ Boolean
9 10 11 12 |
# File 'lib/iron_worker_ng.rb', line 9 def start_with?(prefix) prefix = prefix.to_s self[0, prefix.length] == prefix end |