Vinyl
    Preparing search index...

    Function substitute

    • Given a string with indexed tokens, performs a replacement with the tokens in the provided list. Example:

      substitute('{0}, {1}, and {2}', 'apples', 'bananas', 'pears') // 'apples, bananas, and pears'
      

      Parameters

      • str: string
      • ...tokens: any[]

      Returns string