def parse_string(self, string):
        header = None
        string += '\r\n'
        for match in line_pattern.finditer(string):
            if not header:
                header = match.group(1)
            else:
                ext_match = parse_pattern.match(match.group(1))
                if ext_match:
                    name = ext_match.group(1)
                    arg = ext_match.group(2)
                    if arg:
                        self.add(name, arg)
                    else:
                        self.add(name)
        return header or string.rstrip('\r\n')
Parses a string as returned by the EHLO command and adds all
dataset/ETHPy150Open slimta/python-slimta/slimta/smtp/extensions.py/Extensions.parse_string