import re


def to_snake_case(s: str) -> str:
    """
    Convert camel-cased ``s`` to snake case.

    :param s: string to be converted
    :returns: `s` in snake case
    """
    return re.sub(r"(?!^)([A-Z]+)", r"_\1", s).lower()