Examples
formatString('Hello, {0}!', 'Ada') // 'Hello, Ada!'
formatString('Count: {0}', 0) // 'Count: {0}'Function
formatString(string: string, ...args: any[]): stringReplaces numbered placeholders in a string with truthy positional arguments.
Only placeholders made of decimal digits, such as {0} or {12}, are
recognized. A missing or falsy argument (undefined, null, false, 0,
an empty string, or NaN) leaves its placeholder unchanged. Replacement
values are converted to strings by String.prototype.replace.
formatString('Hello, {0}!', 'Ada') // 'Hello, Ada!'
formatString('Count: {0}', 0) // 'Count: {0}'