Sha256: f8487cf5156e03604fd1b085e4e34f5f1e9dbf48ae641549f6401ef129203233
Contents?: true
Size: 360 Bytes
Versions: 54
Compression:
Stored size: 360 Bytes
Contents
# -*- coding: utf-8 -*- module Picky module CharacterSubstituters class Polish < Base def substitute text trans = @chars.new(text).normalize :kd trans.gsub! 'Ł', 'L' trans.gsub! 'ł', 'l' trans.unpack('U*').select { |cp| cp < 0x0300 || cp > 0x035F }.pack 'U*' end end end end
Version data entries
54 entries across 54 versions & 1 rubygems