• Returns the string that removed the leftmost given string

    Parameters

    • Optionaltext: null | string

      the text to inspect

    • Optionalremove: null | string

      the string to remove

    Returns string | undefined | null

    the string that removed the leftmost given string

    removeStart('foobar', 'hello');    // 'foobar'
    removeStart('foobar', 'foo'); // 'bar'