• Return a string with {n} replaced with the n-th argument.

    Parameters

    • s: string

      The string to format.

    • ...args: any[]

      All other arguments are substituted into the string.

    Returns string

    The formatted string.

    const s = pc.string.format("Hello {0}", "world");
    console.log(s); // Prints "Hello world"