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

    Function formatBrace

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

      Parameters

      • Optionaltext: null | string

        the source string to inspect

      • ...params: any[]

        the parameters to replaced with

      Returns undefined | null | string

      the replaced string of the source string

      David Hsing

      formatBrace('foo{}', 'bar');    //  'foobar'
      formatBrace('foobar{}'); // 'foobar{}'
      formatBrace('hello {}, foo{}', 'world', 'bar'); // 'hello world, foobar'