def _fix_cookiecutter_jinja_var(value, replace='cookiecutter.'):
    """Remove 'cookiecutter.' string from 'cookiecutter.varname' jinja strings

    Can be used to remove different substrings as well by passing a string
    to the optional ``replace`` parameter.

    :param value: The string value within which to replace text
    :type value: str
    :param replace: The string to be removed from the ``value`` input,
                    defaults to 'cookiecutter.'
    :type replace: str
    :return: Returns the input value with the ``replace`` string removed
             if ``value`` is of type str, otherwise it just returns the
             ``value`` input
    """
    if type(value) is str:
        return value.replace(replace, "")
    else:
        return value