parameters: (path)
return_statement: return guard.replace('/', '_').replace('.', '_').replace('\\', '_') + '_'
docstring: Returns the header #define guard for the given file path.
    This treats everything after the last instance of "src/" as being a
    relevant part of the guard. If there is no "src/", then the entire path
    is used.
docstring_summary: Returns the header #define guard for the given file path.
    This treats everything after the last instance of "src/" as being a
    relevant part of the guard. If there is no "src/", then the entire path
    is used.
docstring_tokens: Returns the header #define guard for the given file path . This treats everything after the last instance of src / as being a relevant part of the guard . If there is no src / then the entire path is used .
function: def GetHeaderGuard(path):
    """
    Returns the header #define guard for the given file path.
    This treats everything after the last instance of "src/" as being a
    relevant part of the guard. If there is no "src/", then the entire path
    is used.
    """
    src_index = path.rfind('src/')
    if src_index != -1:
      guard = path[src_index + 4:]
    else:
      guard = path
    guard = guard.upper()
    return guard.replace('/', '_').replace('.', '_').replace('\\', '_') + '_'
function_tokens: def GetHeaderGuard ( path ) : src_index = path . rfind ( 'src/' ) if src_index != - 1 : guard = path [ src_index + 4 : ] else : guard = path guard = guard . upper ( ) return guard . replace ( '/' , '_' ) . replace ( '.' , '_' ) . replace ( '\\' , '_' ) + '_'