Skip to main content

Scalar functions

sequentialString

Commentary

added in 0.1.0

stateful function

Generates strings with sequential enumerated values, like sensor-1, sensor-2, and so on.

Use ~d to insert the ith index. Use ~~ to escape a single tilde.

May optionally supply startingFrom, which defaults to 0.


Examples

Generating sequential strings

{
"_gen": "sequentialString",
"startingFrom": 1,
"expr": "sensor-~d"
}
[
"sensor-1",
"sensor-2",
"sensor-3",
"sensor-4",
"sensor-5"
]

Specification

JSON schema

{
"type": "object",
"properties": {
"startingFrom": {
"type": "integer"
},
"expr": {
"type": "string"
}
}
}