Method: BitClust::NameUtils.encodename_fs

Defined in:
lib/bitclust/nameutils.rb

.encodename_fs(str) ⇒ Object



238
239
240
241
242
# File 'lib/bitclust/nameutils.rb', line 238

def encodename_fs(str)
  str.gsub(/[^a-z0-9_]/n) {|ch|
    (/[A-Z]/n =~ ch) ? "-#{ch}" : sprintf('=%02x', ch[0].ord)
  }.downcase
end