muse-dl/src/util.cr

9 lines
176 B
Crystal
Raw Permalink Normal View History

2020-03-29 14:04:51 +00:00
module Muse::Dl
class Util
# Generates a safe filename
def self.slug_filename(input : String)
2020-04-07 19:25:59 +00:00
input.strip.tr("\u{202E}%$|:;/\"\t\r\n\\", "-")
2020-03-29 14:04:51 +00:00
end
end
end