the input string to apply the suffix replacement to.
the suffix string of the input to replace.
the optional value to replace the the suffix with. defaults to ""
(empty string).
if a matching suffix
is found in the input
, then it will be replaced with the given value
.
otherwise, undefined
will be returned if the input
does not begin with the suffix
.
replace the
suffix
of of a giveninput
string with the given replacevalue
. if a matching suffix is not found, thenundefined
will be returned.Example