tools/metrics/common/pretty_print_xml.py
def LastLineLength(s):
  """Returns the length of the last line in s.

  Args:
    s: A multi-line string, including newlines.

  Returns:
    The length of the last line in s, in characters.
  """
  if s.rfind('\n') == -1:
    return len(s)
  return len(s) - s.rfind('\n') - len('\n')
Returns the length of the last line in s.

  Args:
    s: A multi-line string, including newlines.

  Returns:
    The length of the last line in s, in characters.
  
Returns the length of the last line in s.
Returns the length of the last line in s .
def LastLineLength(s):
  if s.rfind('\n') == -1:
    return len(s)
  return len(s) - s.rfind('\n') - len('\n')
def LastLineLength ( s ) : if s . rfind ( '\n' ) == - 1 : return len ( s ) return len ( s ) - s . rfind ( '\n' ) - len ( '\n' )
Returns the length of the last line in s.
Returns the length of the last line in s .
"""Returns the length of the last line in s.

  Args:
    s: A multi-line string, including newlines.

  Returns:
    The length of the last line in s, in characters.
  """
The length of the last line in s, in characters.
The length of the last line in s in characters .
s
A multi-line string, including newlines.
A multi - line string including newlines .