| Module | CoreEx::String |
| In: |
lib/core_ex/string.rb
|
Provide an helper to cut strings.
Example:
puts " | A very complex | string | with a specific indentation. | |I prefer that instead of a HERE doc | because I keep my indentation. |".head_cut!
# File lib/core_ex/string.rb, line 24 def head_cut! ( sep='\|' ) gsub!(/^\s*#{sep}/, '') self end