mirror of
https://github.com/osiweb/unified_retro_keyboard.git
synced 2024-08-14 21:28:59 +00:00
7 lines
201 B
Ruby
7 lines
201 B
Ruby
|
module TypeSanitizer
|
||
|
def self.sanitize_c_identifier(unsanitized)
|
||
|
# convert filename to valid C identifier by replacing invalid chars with '_'
|
||
|
unsanitized.gsub(/[-\/\\\.\,\s]/, '_')
|
||
|
end
|
||
|
end
|