def strip_quotes(string):
    """
    Strips embedded starting and ending quotes, if any.
    Starting and ending quote characters have to be the same.
    """
    if string[0] == string[-1] and string[0] in ('"', "'"):
        return string[1:-1]
    return string
