Converts a snake_case string to camelCase. Args: snake_str (:obj:`str`): The string to convert. Returns: :obj:`str`: The converted string.
(snake_str: str)
| 43 | |
| 44 | |
| 45 | def to_camel_case(snake_str: str) -> str: |
| 46 | """Converts a snake_case string to camelCase. |
| 47 | |
| 48 | Args: |
| 49 | snake_str (:obj:`str`): The string to convert. |
| 50 | |
| 51 | Returns: |
| 52 | :obj:`str`: The converted string. |
| 53 | """ |
| 54 | components = snake_str.split("_") |
| 55 | return components[0] + "".join(x.title() for x in components[1:]) |
no outgoing calls
searching dependent graphs…