Sha256: 6ed56ef0e7c4a1d1b2fc0af15df11ea2658ff0cf09b5672a7548616748771168
Contents?: true
Size: 346 Bytes
Versions: 2
Compression:
Stored size: 346 Bytes
Contents
class String def begin?(other_str) self.index(other_str) == 0 end def end?(other_str) i = self.rindex(other_str) return false if i.nil? return (self.length == i + other_str.length) end def concat_sep(other_str, sep) return if ! other_str self.concat(sep) if ! empty? self.concat(other_str) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chrysalis-0.1.0 | lib/chrysalis/core_ext/string.rb |
chrysalis-0.1.1 | lib/chrysalis/core_ext/string.rb |