MCPcopy Index your code
hub / github.com/python-telegram-bot/python-telegram-bot / to_camel_case

Function to_camel_case

src/telegram/_utils/strings.py:45–55  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

43
44
45def 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:])

Callers 2

do_api_requestMethod · 0.90

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…