view config/initializers/ext_string.rb @ 233:0f0cc55ff11b

Character class, not literal D
author nanaya <me@nanaya.net>
date Fri, 14 Jul 2023 01:45:40 +0900
parents 61414d0a367b
children
line wrap: on
line source

class String
  def printable
    gsub(/[^\n[:print:]]/, '')
  end
end