1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00
Files
Unity/auto/type_sanitizer.rb
2023-02-16 16:40:23 -05:00

7 lines
199 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