Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
Dan Gorman edited this page Nov 29, 2018 · 2 revisions

The REPT Function

Function Group: Text

REPT repeats a string a given number of times

Syntax

REPT(arg1, arg2)

  • arg1 is the string to be repeated
  • arg2 is the number of repetitions

Uses

Let's say we get a response with a string with some product information, as below:

{  
   "data":{  
      "product_code": "2zf13"
   }
}

If some finicky endpoint requires that we repeat it twice, we can use REPT:

REPT(data.trip.product_code, 2)

which returns "2zf132zf13".

Clone this wiki locally