tools/json_schema_compiler/cpp_util.py
def Classname(s):
  """Translates a namespace name or function name into something more
  suited to C++.

  eg experimental.downloads -> Experimental_Downloads
  updateAll -> UpdateAll
  update_all -> UpdateAll
  """
  if s == '':
    return 'EMPTY_STRING'

  if IsUnixName(s):
    result = CamelCase(s)
  else:
    result = '_'.join([x[0].upper() + x[1:] for x in re.split(r'\W', s)])

  # Ensure the class name follows c++ identifier rules by prepending an
  # underscore if needed.
  assert result
  if result[0].isdigit():
    result = '_' + result
  return result
Translates a namespace name or function name into something more
  suited to C++.

  eg experimental.downloads -> Experimental_Downloads
  updateAll -> UpdateAll
  update_all -> UpdateAll
  
Translates a namespace name or function name into something more
suited to C++.


Translates a namespace name or function name into something more suited to C ++ .
def Classname(s):
  if s == '':
    return 'EMPTY_STRING'
  if IsUnixName(s):
    result = CamelCase(s)
  else:
    result = '_'.join([x[0].upper() + x[1:] for x in re.split(r'\W', s)])
  assert result
  if result[0].isdigit():
    result = '_' + result
  return result
def Classname ( s ) : if s == '' : return 'EMPTY_STRING' if IsUnixName ( s ) : result = CamelCase ( s ) else : result = '_' . join ( [ x [ 0 ] . upper ( ) + x [ 1 : ] for x in re . split ( r'\W' , s ) ] ) assert result if result [ 0 ] . isdigit ( ) : result = '_' + result return result
Translates a namespace name or function name into something more
suited to C++.
Translates a namespace name or function name into something more suited to C ++ .
"""Translates a namespace name or function name into something more
  suited to C++.

  eg experimental.downloads -> Experimental_Downloads
  updateAll -> UpdateAll
  update_all -> UpdateAll
  """ # Ensure the class name follows c++ identifier rules by prepending an # underscore if needed.
s