(s)
return "".join(w.title() for w in tokens)
Convert a snake_case string (maybe with lowerCaseFirst) to CamelCase.
Convert a snake_case string (maybe with lowerCaseFirst) to CamelCase.
Convert a snake_case string ( maybe with lowerCaseFirst ) to CamelCase .
def camel_case(s):
  """Convert a snake_case string (maybe with lowerCaseFirst) to CamelCase."""
  tokens = re.sub(r"([A-Z])", r" \1", s.replace("_", " ")).split()
  return "".join(w.title() for w in tokens)
def camel_case ( s ) : tokens = re . sub ( r"([A-Z])" , r" \1" , s . replace ( "_" , " " ) ) . split ( ) return "" . join ( w . title ( ) for w in tokens )