def uncapitalize_name(name):
    """
        >>> uncapitalize_name("Href")
        'href'
        >>> uncapitalize_name("HttpEquiv")
        'http-equiv'
    """
    buf = []
    for c in name:
        if 'A' <= c <= 'Z' and len(buf):
            buf.append('-')
        buf.append(c)
    return ''.join(buf).lower()
