MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / to_camel_case

Function to_camel_case

roach/utils/config_utils.py:131–138  ·  view source on GitHub ↗
(snake_str, init_capital=False)

Source from the content-addressed store, hash-verified

129
130
131def to_camel_case(snake_str, init_capital=False):
132 # agent_class_str = to_camel_case(agent_module_str.split('.')[-1], init_capital=True)
133 components = snake_str.split('_')
134 if init_capital:
135 init_letter = components[0].title()
136 else:
137 init_letter = components[0]
138 return init_letter + ''.join(x.title() for x in components[1:])
139
140
141def get_free_tcp_port():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected