def _strip_endings_from_string(value: str, *endings: str) -> str:
    """
    Removing instances of each possible `endings` from `value`.

    Example:
        >>> _strip_endings_from_string('some_env', '_env', '_eval')
        'some'
    """
    result = str(value)
    for ending in endings:
        pos = len(ending)
        if result[-pos:] == ending:
            result = result[:-pos]
    return result