mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-10-15 10:29:51 +00:00
git-subtree-dir: tests/unity git-subtree-split: 1782bab0bacd349a45bc215ff91f082912cd7a64
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
|