Sha256: f9255c174b697f5dafd6895cb48ccca0657adc7076a6cf78fe3c9aac32ad6809

Contents?: true

Size: 162 Bytes

Versions: 2

Compression:

Stored size: 162 Bytes

Contents

class String

  def urlencode
    self.dup.force_encoding('ASCII-8BIT').gsub(/[^a-zA-Z0-9_\-.\*]/) do
      sprintf('%%%02X', $&.unpack('C')[0])
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
core_extend-0.2.1 lib/core_extend/String.rb
core_extend-0.2.0 lib/core_extend/String.rb