mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-10-17 20:34:05 +08:00
9 lines
212 B
Ruby
9 lines
212 B
Ruby
module TypeSanitizer
|
|
|
|
def self.sanitize_c_identifier(unsanitized)
|
|
# convert filename to valid C identifier by replacing invalid chars with '_'
|
|
return unsanitized.gsub(/[-\/\\\.\,\s]/, "_")
|
|
end
|
|
|
|
end
|