def replace(params):
    """Replace in a string.  This function works the same exact way a string
    replace operation would work with the ``.replace()`` method.

    **Syntax:**
        [replace]string[/replace]

    **Attributes**
        ``what``
            Substring to replace. (**Required**.)

        ``with``
            The replacement for every occurance of ``what``. (**Required**)
    """
    params['string'] = params['string'].replace(
        params['var']['what'],
        params['var']['with']
    )
    return params