Sha256: 66fd9361ccb3a4aad7eb4541d24b1deab8c98a2352f8611de55b81c1bc2ac8ce
Contents?: true
Size: 407 Bytes
Versions: 9
Compression:
Stored size: 407 Bytes
Contents
module Antlr4Native module StringHelpers def capitalize(str) str.sub(/\A(.)/) { $1.upcase } end def underscore(str) str .gsub(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2') .gsub(/([a-z\d])([A-Z])/, '\1_\2') .gsub('-', '_') .downcase end def dasherize(str) underscore(str).gsub('_', '-') end end StringHelpers.extend(StringHelpers) end
Version data entries
9 entries across 9 versions & 1 rubygems