MCPcopy
hub / github.com/huggingface/datasets / camelcase_to_snakecase

Function camelcase_to_snakecase

src/datasets/naming.py:34–38  ·  view source on GitHub ↗

Convert camel-case string to snake-case.

(name)

Source from the content-addressed store, hash-verified

32
33
34def camelcase_to_snakecase(name):
35 """Convert camel-case string to snake-case."""
36 name = _uppercase_uppercase_re.sub(r"\1_\2", name)
37 name = _lowercase_uppercase_re.sub(r"\1_\2", name)
38 return name.lower()
39
40
41def snakecase_to_camelcase(name):

Callers 9

_find_hash_in_cacheFunction · 0.90
filename_prefix_for_nameFunction · 0.85
__init__Method · 0.85
get_moduleMethod · 0.85
get_moduleMethod · 0.85
get_moduleMethod · 0.85
get_moduleMethod · 0.85
get_moduleMethod · 0.85
to_yaml_innerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected