Files
Unity/auto/type_sanitizer.rb
Mark VanderVoord 1a29024cc7 It's a New Year
2025-01-01 11:46:30 -05:00

14 lines
518 B
Ruby

# =========================================================================
# Unity - A Test Framework for C
# ThrowTheSwitch.org
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
# SPDX-License-Identifier: MIT
# =========================================================================
module TypeSanitizer
def self.sanitize_c_identifier(unsanitized)
# convert filename to valid C identifier by replacing invalid chars with '_'
unsanitized.gsub(/[-\/\\.,\s]/, '_')
end
end