Sha256: bfff68568efbd0ec027031232c75580390f81c65b69b2ca8f4dc37340c6cfcb0
Contents?: true
Size: 279 Bytes
Versions: 6
Compression:
Stored size: 279 Bytes
Contents
class String alias :blank? :empty? def replace_all! this_string gsub!(/^.*$/, this_string) end def last n if n > 0 out = self[-n..-1] else out = '' # case 0 or less end out ||= self.dup # I guess .dup is good... end end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
sane-0.25.8 | lib/sane/string.rb |
sane-0.25.7 | lib/sane/string.rb |
sane-0.25.6 | lib/sane/string.rb |
sane-0.25.5 | lib/sane/string.rb |
sane-0.25.4 | lib/sane/string.rb |
sane-0.25.3 | lib/sane/string.rb |