MCPcopy Index your code
hub / github.com/OpenBMB/ChatDev / titleize

Function titleize

utils/strs.py:1–5  ·  view source on GitHub ↗
(value: str)

Source from the content-addressed store, hash-verified

1def titleize(value: str) -> str:
2 sanitized = value.replace("_", " ").replace("-", " ").strip()
3 if not sanitized:
4 return value
5 return " ".join(part.capitalize() for part in sanitized.split())

Callers 3

enum_options_forFunction · 0.90
enum_options_from_valuesFunction · 0.90
_apply_provider_enumMethod · 0.90

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected