def parse_string (s):
    """Grab a string, stripping it of quotes; return string, length."""
    if s[0] != '"':
        string, delim, garbage = s.partition (" ")
        return string.strip (), len (string) + 1

    else:
        try:
            second_quote = s[1:].index ('"') + 1
        except ValueError:
            return s[1:], len (s)
        else:
            beyond = s[second_quote + 1:]
            beyond_stripped = beyond.lstrip ()
            extra_garbage = len (beyond) - len (beyond_stripped)
            return s[1:second_quote], second_quote + 1 + extra_garbage