This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
REPT
Dan Gorman edited this page Nov 29, 2018
·
2 revisions
REPT
repeats a string a given number of times
REPT(arg1, arg2)
-
arg1
is the string to be repeated -
arg2
is the number of repetitions
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"
.