Sha256: 68b70f476034ca92c161b07875a27c999ab4fd2aabe1114053fc25945306d5fd
Contents?: true
Size: 460 Bytes
Versions: 16
Compression:
Stored size: 460 Bytes
Contents
# encoding: utf-8 # extend class String with a `prepend` method class String if RUBY_VERSION =~ /^1\.8/ def prepend(value) insert(0, value) end end def starts_with?(prefix) prefix = prefix.to_s self[0, prefix.length] == prefix end def double_delimiters gsub('\\', '\\\\\\') end def double_delimiters! replace(self.double_delimiters) end end
Version data entries
16 entries across 16 versions & 1 rubygems