• Return a new string with the content of str where the first occurrence of pattern is replaced by replacement.

    Parameters

    • str: string
    • pattern: string
    • replacement: string

    Returns string