Sha256: 72aab0d2553abd4188d627670e417de361768b2ff2b9e2f1284bed773d09506d

Contents?: true

Size: 189 Bytes

Versions: 7

Compression:

Stored size: 189 Bytes

Contents

module Commons
  module Formatter
    module StringUtils
      def self.capitalize(text)
        text.downcase.gsub(/(?!(las?|del?|los?|y)\b)\b\p{L}/, &:upcase)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
commons_yellowme-0.16.0 lib/commons/formatter/string_utils.rb
commons_yellowme-0.15.0 lib/commons/formatter/string_utils.rb
commons_yellowme-0.12.0 lib/commons/formatter/string_utils.rb
commons_yellowme-0.11.3 lib/commons/formatter/string_utils.rb
commons_yellowme-0.11.2 lib/commons/formatter/string_utils.rb
commons_yellowme-0.11.1 lib/commons/formatter/string_utils.rb
commons_yellowme-0.11.0 lib/commons/formatter/string_utils.rb