Function removeEnd

  • Removes a value from the end of a string.

    If the string does not end with the value, nothing is done.

    Since

    13.0.0

    See

    removeStart

    Returns

    String with the value removed from the end.

    Example

    removeEnd("FooBar", "Bar")
    // => "Foo"

    removeEnd("FooBar", "Foo")
    // => "FooBar"

    removeEnd("FooBar", "Buzz")
    // => "FooBar"

    Parameters

    • string: string

      String to check.

    • removeValue: string

      Value to remove.

    Returns string

Generated using TypeDoc