(s)
return func_name
Get the function name from a C-style function declaration string.

    :param str s: A C-style function declaration string.
    :return:      The function name.
    :rtype:       str
Get the function name from a C-style function declaration string.
Get the function name from a C - style function declaration string .
def get_function_name(s):
    """
    Get the function name from a C-style function declaration string.

    :param str s: A C-style function declaration string.
    :return:      The function name.
    :rtype:       str
    """

    s = s.strip()
    if s.startswith("__attribute__"):
        # Remove "__attribute__ ((foobar))"
        if "))" not in s:
            raise ValueError("__attribute__ is present, but I cannot find double-right parenthesis in the function "
                             "declaration string.")

        s = s[s.index("))") + 2 : ].strip()

    if '(' not in s:
        raise ValueError("Cannot find any left parenthesis in the function declaration string.")

    func_name = s[:s.index('(')].strip()

    for i, ch in enumerate(reversed(func_name)):
        if ch == ' ':
            pos = len(func_name) - 1 - i
            break
    else:
        raise ValueError('Cannot find any space in the function declaration string.')

    func_name = func_name[pos + 1 : ]
    return func_name
def get_function_name ( s ) : s = s . strip ( ) if s . startswith ( "__attribute__" ) : # Remove "__attribute__ ((foobar))" if "))" not in s : raise ValueError ( "__attribute__ is present, but I cannot find double-right parenthesis in the function " "declaration string." ) s = s [ s . index ( "))" ) + 2 : ] . strip ( ) if '(' not in s : raise ValueError ( "Cannot find any left parenthesis in the function declaration string." ) func_name = s [ : s . index ( '(' ) ] . strip ( ) for i , ch in enumerate ( reversed ( func_name ) ) : if ch == ' ' : pos = len ( func_name ) - 1 - i break else : raise ValueError ( 'Cannot find any space in the function declaration string.' ) func_name = func_name [ pos + 1 : ] return func_name