def remove_prefix()

in dataflux_core/fast_list.py [0:0]


def remove_prefix(text: str, prefix: str):
    """Helper function that removes prefix from a string.

    Args:
        text: String of text to trim a prefix from.
        prefix: String of text that will be trimmed from text.

    Returns:
        Text value with the specified prefix removed.
    """
    # Note that as of python 3.9 removeprefix is built into string.
    if text.startswith(prefix):
        return text[len(prefix):]
    return text