Sha256: 6079d60eaa6e0b264449f3e3b3d129f5e7b1b1bc6937b211049ef9b40ac9dc9b
Contents?: true
Size: 301 Bytes
Versions: 1
Compression:
Stored size: 301 Bytes
Contents
# encoding: utf-8 # Utility class class Utils # Sanitize a UTF 8 string : remove invalid characters def self.removeInvalidChars(str) if(str && !str.valid_encoding?) return str.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: "") end return str end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
logstash-filter-search-engine-2.0.0 | lib/logstash/filters/utils.rb |