Sha256: bef92f97545864922aa88bae7a79b43ebd50e04ef4ec10a853fadda7c1e00a31
Contents?: true
Size: 600 Bytes
Versions: 1
Compression:
Stored size: 600 Bytes
Contents
# Author:: Nicolas Pouillard <ertai@lrde.epita.fr>. # Copyright:: Copyright (c) 2004, 2005 Nicolas Pouillard. All rights reserved. # License:: GNU General Public License (GPL). # Revision:: $Id$ class String # # 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! # def head_cut! ( sep='\|' ) gsub!(/^\s*#{sep}/, '') self end end # class String
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vcs-0.2.148 | ruby_ex/string_ex.rb |