mirror of
https://github.com/OpenBMB/ChatDev.git
synced 2026-04-25 11:18:06 +00:00
5 lines
210 B
Python
Executable File
5 lines
210 B
Python
Executable File
def titleize(value: str) -> str:
|
|
sanitized = value.replace("_", " ").replace("-", " ").strip()
|
|
if not sanitized:
|
|
return value
|
|
return " ".join(part.capitalize() for part in sanitized.split()) |