tools/binary_size/libsupersize/function_signature.py
def _FindReturnValueSpace(name, paren_idx):
  """Returns the index of the space that comes after the return type."""
  space_idx = paren_idx
  # Special case: const cast operators (see tests).
  if -1 != name.find(' const', paren_idx - 6, paren_idx):
    space_idx = paren_idx - 6
  while True:
    space_idx = _FindLastCharOutsideOfBrackets(name, ' ', space_idx)
    # Special cases: "operator new", "operator< <templ>", "operator<< <tmpl>".
    # No space is added for operator>><tmpl>.
    if -1 == space_idx:
      break

    if -1 != name.find('operator', space_idx - 8, space_idx):
      space_idx -= 8
    elif -1 != name.find('operator<', space_idx - 9, space_idx):
      space_idx -= 9
    elif -1 != name.find('operator<<', space_idx - 10, space_idx):
      space_idx -= 10
    else:
      break

  return space_idx
Returns the index of the space that comes after the return type.
Returns the index of the space that comes after the return type.
Returns the index of the space that comes after the return type .
def _FindReturnValueSpace(name, paren_idx):
  space_idx = paren_idx
  if -1 != name.find(' const', paren_idx - 6, paren_idx):
    space_idx = paren_idx - 6
  while True:
    space_idx = _FindLastCharOutsideOfBrackets(name, ' ', space_idx)
    if -1 == space_idx:
      break
    if -1 != name.find('operator', space_idx - 8, space_idx):
      space_idx -= 8
    elif -1 != name.find('operator<', space_idx - 9, space_idx):
      space_idx -= 9
    elif -1 != name.find('operator<<', space_idx - 10, space_idx):
      space_idx -= 10
    else:
      break
  return space_idx
def _FindReturnValueSpace ( name , paren_idx ) : space_idx = paren_idx if - 1 != name . find ( ' const' , paren_idx - 6 , paren_idx ) : space_idx = paren_idx - 6 while True : space_idx = _FindLastCharOutsideOfBrackets ( name , ' ' , space_idx ) if - 1 == space_idx : break if - 1 != name . find ( 'operator' , space_idx - 8 , space_idx ) : space_idx -= 8 elif - 1 != name . find ( 'operator<' , space_idx - 9 , space_idx ) : space_idx -= 9 elif - 1 != name . find ( 'operator<<' , space_idx - 10 , space_idx ) : space_idx -= 10 else : break return space_idx
Returns the index of the space that comes after the return type.
Returns the index of the space that comes after the return type .
"""Returns the index of the space that comes after the return type.""" # Special case: const cast operators (see tests). # Special cases: "operator new", "operator< <templ>", "operator<< <tmpl>". # No space is added for operator>><tmpl>.
name
paren_idx