def pascal_name(name: str) -> str: """Transform a method, or class name into a valid one for C#""" candidate = pascal_case(name) if candidate in ("Main", "Program", "System", "Console", "Array", "String"): return candidate + "_" return candidate
def struct_name(name: str) -> str: """Transform a struct name into a valid one for Julia""" candidate = pascal_case(name) if candidate in RESERVED: return candidate + "_" return candidate
def class_name(name: str) -> str: """Transform a class name into a valid one for Python""" candidate = pascal_case(name) return candidate + "_" if candidate == "List" else candidate
def struct_name(name: str) -> str: """Transform a struct name into a valid one for C++""" return pascal_case(name)
def struct_name(name: str) -> str: """Transform a struct name into a valid one for Go""" candidate = pascal_case(name) if candidate in KEYWORDS: return candidate + "_" return candidate
def class_name(name: str) -> str: """Transform a class name into a valid one for Java""" candidate = pascal_case(name) if candidate in ("Main", "Integer", "String", "System"): return candidate + "_" return candidate
def var_name(name: str) -> str: """Transform a variable name into a valid one for Pascal""" candidate = pascal_case(name) if candidate.lower() in KEYWORDS: return candidate + "_" return candidate
def var_name(name: str) -> str: """Transform a variable name into a valid one for Prolog""" return pascal_case(name)
def struct_name(name: str) -> str: """Transform a struct name into a valid one for D""" # https://dlang.org/dstyle.html#naming_classes candidate = pascal_case(name) return candidate