Returns the replaced string of the source string ("%" placeholder) with the given parameters
Optional
the source string to inspect
Rest
the parameters to replaced with
the replaced string of the source string
"https://github.com/samsonjs/format/blob/main/format.js"
formatPercent("foo%s", "bar"); // "foobar"formatPercent("foobar %d", 2023); // "foobar 2023"formatPercent("hello %s, foo%s", "world", "bar"); // "hello world, foobar" Copy
formatPercent("foo%s", "bar"); // "foobar"formatPercent("foobar %d", 2023); // "foobar 2023"formatPercent("hello %s, foo%s", "world", "bar"); // "hello world, foobar"
Returns the replaced string of the source string ("%" placeholder) with the given parameters