@unikue/ts-lang-utils
    Preparing search index...

    Function formatPercent

    • Returns the replaced string of the source string ("%" placeholder) with the given parameters

      Parameters

      • Optionaltext: string | null

        The source string to inspect

      • ...params: any[]

        The parameters to replaced with

      Returns string | null | undefined

      the replaced string of the source string

      David Hsing

      formatPercent("foo%s", "bar");    // "foobar"
      formatPercent("foobar %d", 2023); // "foobar 2023"
      formatPercent("hello %s, foo%s", "world", "bar"); // "hello world, foobar"