third_party/blink/tools/blinkpy/style/checkers/cpp.py
def iteratively_replace_matches_with_char(pattern, char_replacement, s):
    """Returns the string with replacement done.

    Every character in the match is replaced with char.
    Due to the iterative nature, pattern should not match char or
    there will be an infinite loop.

    Example:
      pattern = r'<[^>]>' # template parameters
      char_replacement =  '_'
      s =     'A<B<C, D>>'
      Returns 'A_________'

    Args:
      pattern: The regex to match.
      char_replacement: The character to put in place of every
                        character of the match.
      s: The string on which to do the replacements.

    Returns:
      True, if the given line is blank.
    """
    while True:
        matched = search(pattern, s)
        if not matched:
            return s
        start_match_index = matched.start(0)
        end_match_index = matched.end(0)
        match_length = end_match_index - start_match_index
        s = (s[:start_match_index] + char_replacement * match_length +
             s[end_match_index:])
Returns the string with replacement done.

    Every character in the match is replaced with char.
    Due to the iterative nature, pattern should not match char or
    there will be an infinite loop.

    Example:
      pattern = r'<[^>]>' # template parameters
      char_replacement =  '_'
      s =     'A<B<C, D>>'
      Returns 'A_________'

    Args:
      pattern: The regex to match.
      char_replacement: The character to put in place of every
                        character of the match.
      s: The string on which to do the replacements.

    Returns:
      True, if the given line is blank.
    
Returns the string with replacement done.
Every character in the match is replaced with char.
Due to the iterative nature, pattern should not match char or
there will be an infinite loop.
Returns the string with replacement done . Every character in the match is replaced with char . Due to the iterative nature pattern should not match char or there will be an infinite loop .
def iteratively_replace_matches_with_char(pattern, char_replacement, s):
    while True:
        matched = search(pattern, s)
        if not matched:
            return s
        start_match_index = matched.start(0)
        end_match_index = matched.end(0)
        match_length = end_match_index - start_match_index
        s = (s[:start_match_index] + char_replacement * match_length +
             s[end_match_index:])
def iteratively_replace_matches_with_char ( pattern , char_replacement , s ) : while True : matched = search ( pattern , s ) if not matched : return s start_match_index = matched . start ( 0 ) end_match_index = matched . end ( 0 ) match_length = end_match_index - start_match_index s = ( s [ : start_match_index ] + char_replacement * match_length + s [ end_match_index : ] )
Returns the string with replacement done.
Returns the string with replacement done .
"""Returns the string with replacement done.

    Every character in the match is replaced with char.
    Due to the iterative nature, pattern should not match char or
    there will be an infinite loop.

    Example:
      pattern = r'<[^>]>' # template parameters
      char_replacement =  '_'
      s =     'A<B<C, D>>'
      Returns 'A_________'

    Args:
      pattern: The regex to match.
      char_replacement: The character to put in place of every
                        character of the match.
      s: The string on which to do the replacements.

    Returns:
      True, if the given line is blank.
    """
True, if the given line is blank.
True if the given line is blank .
pattern
The regex to match.
The regex to match .
char_replacement
The character to put in place of every
character of the match.
The character to put in place of every character of the match .
s
The string on which to do the replacements.
The string on which to do the replacements .
examples
None