File: utils.rb

package info (click to toggle)
ruby-ahoy-matey 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 380 kB
  • sloc: ruby: 1,303; makefile: 3
file content (7 lines) | stat: -rw-r--r-- 167 bytes parent folder | download
1
2
3
4
5
6
7
module Ahoy
  module Utils
    def self.ensure_utf8(str)
      str.encode("UTF-8", "binary", invalid: :replace, undef: :replace, replace: "") if str
    end
  end
end